CVE-2021-32740
rubygem-addressable: ReDoS in templates
Overview
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.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-400
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| RubyGems | addressable | >=2.3.0, <2.8.0 | 2.8.0 |
Open a package to see all its vulnerabilities.
Operating systems · 30 fixes
Red Hat 3 releases · 15 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | logging-fluentd +1 | eol | — |
| 7 | cfme-gemset +1 | wont fix | — |
| 7 | python3-ecdsa | 0:0.13.3-2.el7pc | RHSA-2021:4702 |
| 7 | tfm-rubygem-nokogiri | 0:1.11.3-2.el7sat | RHSA-2021:4702 |
| 7 | python3-urllib3 | 0:1.26.5-1.el7pc | RHSA-2021:4702 |
| 7 | tfm-rubygem-activerecord-session-store | 0:2.0.0-1.el7sat | RHSA-2021:4702 |
10 more rows
alpine 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | ruby-addressable | 2.8.0-r0 |
| 3.23 | ruby-addressable | 2.8.0-r0 |
| 3.24 | ruby-addressable | 2.8.0-r0 |
| edge | ruby-addressable | 2.8.0-r0 |
debian 6 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 10 | ruby-addressable | affected |
| 11 | ruby-addressable | 2.7.0-2 |
| 12 | ruby-addressable | 2.7.0-2 |
| 13 | ruby-addressable | 2.7.0-2 |
| 14 | ruby-addressable | 2.7.0-2 |
| 9 | ruby-addressable | affected |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| ruby-addressable | 2.7.0-2 |
openSUSE 1 release · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | ruby2-7-rubygem-http +1 | 5.0.4-1.1 | openSUSE-SU-2024:11592-1 |
| Tumbleweed | ruby3-1-rubygem-http | 5.1.0-1.1 | openSUSE-SU-2024:12247-1 |
| Tumbleweed | ruby3-2-rubygem-http | 5.1.0-1.4 | openSUSE-SU-2024:13157-1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2021-32740
- github.com https://github.com/advisories/GHSA-jxhc-q857-3j6g
- github.com https://github.com/rubysec/ruby-advisory-db/blob/master/gems/addressable/CVE-2021-32740.yml
- github.com https://github.com/sporkmonger/addressable
- github.com https://github.com/sporkmonger/addressable/commit/0d8a3127e35886ce9284810a7f2438bff6b43cbc
- github.com https://github.com/sporkmonger/addressable/commit/89c76130ce255c601f642a018cb5fb5a80e679a7
- github.com https://github.com/sporkmonger/addressable/commit/92685096b1f7235ed8986c03ce30a24972eed848#diff-fb36d3dc67e6565ffde17e666a98697f48e76dac38fabf1bb9e97cdf3b583d76
- github.com https://github.com/sporkmonger/addressable/security/advisories/GHSA-jxhc-q857-3j6g
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SDFQM2NHNAZ3NNUQZEJTYECYZYXV4UDS/
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WYPVOOQU7UB277UUERJMCNQLRCXRCIQ5/
Show all 14 references
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SDFQM2NHNAZ3NNUQZEJTYECYZYXV4UDS
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WYPVOOQU7UB277UUERJMCNQLRCXRCIQ5
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2021-32740
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2021-32740
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.