Loading...
Skip to main content

CVE-2021-32740 — Regular Expression Denial of Service in...

HIGH

Regular Expression Denial of Service in Addressable templates

Published July 12, 2021Updated July 8, 2026Source: osv

Summary

### Impact 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. ### Patches The vulnerability was introduced in version 2.3.0 (previously yanked) and has been present in all subsequent versions up to, and including, 2.7.0. It is fixed in version 2.8.0. ### Workarounds The vulnerability can be avoided by only creating Template objects from trusted sources that have been validated not to produce catastrophic backtracking. ### References - https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS - https://cwe.mitre.org/data/definitions/1333.html - https://www.regular-expressions.info/catastrophic.html ### For more information If you have any questions or comments about this advisory: * [Open an issue](https://github.com/sporkmonger/addressable/issues)

Advisory Timeline

  • First published July 12, 2021 (1918 days ago).
  • Last revised July 8, 2026 — 1822 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update addressable to 2.8.0 or later
gem install addressable -v 2.8.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
addressable
rubygems
2.3.2, 2.3.3, 2.3.4, 2.3.5 (+9 more)2.8.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.

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

Frequently Asked Questions

What is CVE-2021-32740?
Regular Expression Denial of Service in Addressable templates This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
How do I check if my project is affected by CVE-2021-32740?
CVE-2021-32740 affects addressable. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2021-32740 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.5

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-jxhc-q857-3j6g

Related CVEs

  • CVE-2026-94462
    HIGH

    Spree: Broken Access Control in `PATCH /api/v3/store/carts/:id/associate` (IDOR)

  • CVE-2026-35611
    HIGH

    Addressable has a Regular Expression Denial of Service in Addressable templates

  • CVE-2026-77601
    HIGH

    OpenC3 COSMOS: Authenticated OS command injection via the `pypi_url` setting

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies