# CVE-2021-32740: Regular Expression Denial of Service in Addressable templates

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.14%, higher than 82% of CVEs (2026-12-01)
- Published: 2021-07-06T14:15:12.000Z
- Modified: 2026-07-08T06:30:05.313Z
- Also known as: GHSA-jxhc-q857-3j6g
- Weaknesses: CWE-400, CWE-1333
- Assigned by: GitHub_M

## Description

Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. An uncontrolled resource consumption vulnerability exists after version 2.3.0 through version 2.7.0. Within the URI template implementation in Addressable, a maliciously crafted template may result in uncontrolled resource consumption, leading to denial of service when matched against a URI. In typical usage, templates would not normally be read from untrusted user input, but nonetheless, no previous security advisory for Addressable has cautioned against doing this. Users of the parsing capabilities in Addressable but not the URI template capabilities are unaffected. The vulnerability is patched in version 2.8.0. As a workaround, only create Template objects from trusted sources that have been validated not to produce catastrophic backtracking.

(As written by CVE List.)

## Affected

- sporkmonger addressable: > 2.3.0, <= 2.7.0
- addressable (RubyGems): from 2.3.0 before 2.8.0
- addressable_project addressable: from 2.3.0 before 2.8.0
- fedoraproject fedora: 33; 34

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://github.com/sporkmonger/addressable/security/advisories/GHSA-jxhc-q857-3j6g> (third-party-advisory, web)
- <https://github.com/sporkmonger/addressable/commit/0d8a3127e35886ce9284810a7f2438bff6b43cbc> (patch, release-notes, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WYPVOOQU7UB277UUERJMCNQLRCXRCIQ5/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SDFQM2NHNAZ3NNUQZEJTYECYZYXV4UDS/> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32740> (advisory)
- <https://github.com/sporkmonger/addressable/commit/89c76130ce255c601f642a018cb5fb5a80e679a7> (web)
- <https://github.com/sporkmonger/addressable/commit/92685096b1f7235ed8986c03ce30a24972eed848#diff-fb36d3dc67e6565ffde17e666a98697f48e76dac38fabf1bb9e97cdf3b583d76> (web)
- <https://github.com/advisories/GHSA-jxhc-q857-3j6g> (advisory)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/addressable/CVE-2021-32740.yml> (web)
- <https://github.com/sporkmonger/addressable> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SDFQM2NHNAZ3NNUQZEJTYECYZYXV4UDS> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WYPVOOQU7UB277UUERJMCNQLRCXRCIQ5> (web)

## Sources

- CVE List: [CVE-2021-32740](https://www.cve.org/CVERecord?id=CVE-2021-32740), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-jxhc-q857-3j6g](https://github.com/advisories/GHSA-jxhc-q857-3j6g), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-32740](https://nvd.nist.gov/vuln/detail/CVE-2021-32740), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-32740 · Whole record: https://cve.day/CVE-2021-32740.json · Rebuilt by cve.day 2026-11-25T22:58:02.437Z
