Regular Expression Denial of Service in Addressable templates
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 2 fixed, 6 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-400.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| sporkmonger | addressable | > 2.3.0, <= 2.7.0 | — | No fix listed | CNA |
| — | addressable (RubyGems) | 2.3.0 to before 2.8.0 | 2.8.0 | Patch available | GHSA-jxhc-q857-3j6g |
- addressable Vendorsporkmonger Affected > 2.3.0, <= 2.7.0 Fixed in — No fix listed CNA
- addressable (RubyGems) Vendor— Affected 2.3.0 to before 2.8.0 Fixed in 2.8.0 Patch available GHSA-jxhc-q857-3j6g
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:addressable_project:addressable:*:*:*:*:*:ruby:*:* | 2.3.0 to before 2.8.0 | Vulnerable | Addressable Project |
| cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* | 33 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* | 34 | Vulnerable | Fedoraproject |
- cpe:2.3:a:addressable_project:addressable:*:*:*:*:*:ruby:*:* Versions 2.3.0 to before 2.8.0 Vulnerable ·Addressable Project
- cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* Versions 33 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* Versions 34 Vulnerable ·Fedoraproject
Remediation
- Fix · GHSA-jxhc-q857-3j6g addressable (RubyGems) Fixed in 2.8.0 Advisory →
Red Hat 1 advisory
- RHSA-2021:4702 Released 2021-11-16 · Red Hat rating ModerateSatellite 6.10 Release
- Red Hat Satellite 6.10 candlepin-4.0.9-1.el7sat, foreman-2.5.2.17-2.el7sat, python-aiohttp-3.7.4-1.el7pc +14
- Red Hat Satellite Capsule 6.10 foreman-2.5.2.17-2.el7sat, python-aiohttp-3.7.4-1.el7pc, python-ecdsa-0.13.3-2.el7pc +9
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| CloudForms Management Engine 5 | Affected | No fix planned: Will not fix |
| Red Hat 3scale API Management Platform 2 | Affected | No fix yet |
| Red Hat OpenShift Container Platform 3.11 | Affected | No fix planned: Out of support scope |
| Red Hat OpenShift Container Platform 4 | Affected | No fix planned: Will not fix |
| Red Hat OpenStack Platform 13 (Queens) Operational Tools | Affected | No fix planned: Out of support scope |
| Red Hat Single Sign-On 7 | Affected | No fix planned: Will not fix |
| OpenShift Logging 5.2 | Fixed | — |
| Red Hat Satellite 6.10 | Fixed | RHSA-2021:4702 |
Not affected: 4 products
- Logging Subsystem for Red Hat OpenShift
- OpenShift Logging 5.2
- Red Hat Satellite 6.10
- Red Hat Satellite Capsule 6.10
Timeline
- 2026-10-02 Threatist record created from CVE-2021-32740
- 2026-10-03 Alias added: GHSA-jxhc-q857-3j6g
References
Advisory 5
Other 6
- https://github.com/sporkmonger/addressable/commit/89c76130ce255c601f642a018cb5fb5a80e679a7
- https://github.com/sporkmonger/addressable/commit/92685096b1f7235ed8986c03ce30a24972eed848#diff-fb36d3dc67e6565ffde17e666a98697f48e76dac38fabf1bb9e97cdf3b583d76
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/addressable/CVE-2021-32740.yml
- https://github.com/sporkmonger/addressable
- https://lists.fedoraproject.org/archives/list/[email protected]/message/SDFQM2NHNAZ3NNUQZEJTYECYZYXV4UDS
- https://lists.fedoraproject.org/archives/list/[email protected]/message/WYPVOOQU7UB277UUERJMCNQLRCXRCIQ5
Sources
- CVE-2021-32740 · CVE Program
- CVE-2021-32740 · NVD
- FIRST EPSS
- GHSA-jxhc-q857-3j6g · GitHub Advisory Database · CC BY 4.0
- CVE-2021-32740 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences