CVE-2021-32740
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.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
OS impact
| OS | Version | Status | Fixed in |
|---|---|---|---|
| arch | fixed | 2.8.0-1 | |
| sles | affected | | |
| debian | bookworm | fixed | 2.7.0-2 |
| debian | bullseye | fixed | 2.7.0-2 |
| debian | forky | fixed | 2.7.0-2 |
| debian | sid | fixed | 2.7.0-2 |
| debian | trixie | fixed | 2.7.0-2 |
Package impact
| Ecosystem | Package | Vulnerable | Fixed |
|---|---|---|---|
| RubyGems | addressable | !< 2.3.0||<>= 2.8.0 | >= 2.8.0 |
| RubyGems | addressable | >=2.3.0,<2.8.0 | 2.8.0 |
References
- https://github.com/advisories/GHSA-jxhc-q857-3j6g
- https://security.archlinux.org/ASA-202107-19
- https://www.suse.com/security/cve/CVE-2021-32740.html
- https://github.com/sporkmonger/addressable/security/advisories/GHSA-jxhc-q857-3j6g
- https://nvd.nist.gov/vuln/detail/CVE-2021-32740
- https://github.com/sporkmonger/addressable/commit/0d8a3127e35886ce9284810a7f2438bff6b43cbc
- 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/package-announce@lists.fedoraproject.org/message/SDFQM2NHNAZ3NNUQZEJTYECYZYXV4UDS
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WYPVOOQU7UB277UUERJMCNQLRCXRCIQ5
- https://security-tracker.debian.org/tracker/CVE-2021-32740
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.