CVE-2026-126352 — Vulnerability in addressable — CVE Details
Addressable: Regular Expression Denial of Service in templates with multiple variables
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.52%). Schedule for your next planned update.
Does your project use an affected addressable version?
Paste your Gemfile.lock to check it for CVE-2026-126352 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Impact
Within the URI template implementation in Addressable, templates that put several variables in one expression generate regular expressions vulnerable to excessive backtracking:
- Expressions with any operator other than
+and#(e.g.,{/owner,repo,ref},{.a,b},{a,b,c},{;a,b,c}). The values are joined by an optional separator, so a run of characters can be divided among the variables in O(n^k) ways for k variables. - Expressions with the
+or#operators and many variables (e.g.,{+v1,v2,v3,v4,v5,v6,v7,v8,v9,v10}). A failing match is exponential in the number of variables. - Several single-variable expressions next to each other (e.g.,
{+a}{+b}{+c}or{a}{b}{c}), which are polynomial in the input length.
When Template#match or Template#extract is called with a maliciously crafted URI, this can result in uncontrolled resource consumption, leading to denial of service. A three-variable path template such as http://example.com/repos{/owner,repo,ref} needs about 2 KB of input to occupy a thread for many seconds.
Users of the URI parsing capabilities in Addressable but not the URI template matching capabilities are unaffected. Users who only call Template#expand are unaffected.
Affected Versions
This vulnerability affects Addressable >= 2.3.0 (note: 2.3.0 and 2.3.1 were yanked; the earliest installable release is 2.3.2), including 2.9.0. It is fixed in 2.9.1.
The vulnerability is exploitable on Ruby implementations whose regular expression engine backtracks without memoization: MRI Ruby < 3.2 and JRuby. The second form, many-variable + and # expressions, is also exploitable on MRI Ruby 3.2, which does not memoize a regular expression that contains possessive quantifiers, and 2.9.0 generates those for these operators. It is also exploitable on TruffleRuby 40.0, whose regular expression engine falls back to backtracking for them. MRI Ruby 3.3 and later are not affected by any form, because they memoize those regular expressions too. TruffleRuby 40.0 is not affected by the other two forms. Earlier TruffleRuby versions were not tested.
This has been confirmed on the following runtimes with Addressable 2.9.0:
| Runtime | Status |
|---|---|
| MRI Ruby 2.7 | Vulnerable |
| MRI Ruby 3.1 | Vulnerable |
| MRI Ruby 3.2 | Vulnerable |
| MRI Ruby 3.3 | Not affected |
| MRI Ruby 3.4 | Not affected |
| MRI Ruby 4.0 | Not affected |
| JRuby 9.4 | Vulnerable |
| JRuby 10.1 | Vulnerable |
| TruffleRuby 40.0 | Vulnerable |
Workarounds
- Upgrade to MRI Ruby 3.3 or later, if a consuming application does not use JRuby or TruffleRuby.
- Avoid matching user-supplied input on unpatched versions of the library against templates with several variables in one expression, or with several expressions next to each other.
- Apply a short timeout around any call to
Template#matchorTemplate#extractthat processes user-supplied data.
Credits
Reported by Matthew Mongeau (@halogenandtoast), Ruby Central Gem Security.
For more information
If there are any questions or comments about this advisory:
Advisory Timeline
- First published November 12, 2026 (14 days ago).
- Last revised November 12, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install addressable -v 2.9.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| addressable RubyGems · Affected: 2.3.2, 2.3.3, 2.3.4, 2.3.5 (+21 more) | 2.9.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-1333
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.9 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/sporkmonger/addressable/security/advisories/GHSA-9f42-57jx-vpp3WEB
- https://github.com/sporkmonger/addressable/commit/f2b27b3ab252e56b3fa3519f7ebb491d54cf7b7cWEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/addressable/GHSA-9f42-57jx-vpp3.ymlWEB
- https://github.com/sporkmonger/addressablePACKAGE
- https://github.com/sporkmonger/addressable/releases/tag/addressable-2.9.1WEB
Frequently Asked Questions
- What is CVE-2026-126352?
- Addressable: Regular Expression Denial of Service in templates with multiple variables. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.9/10).
- How do I check if my project is affected by CVE-2026-126352?
- CVE-2026-126352 affects addressable. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-126352 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 37.2% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-35611HIGH
Addressable has a Regular Expression Denial of Service in Addressable templates
- CVE-2021-32740HIGH
Regular Expression Denial of Service in Addressable templates
- CVE-2026-128084MEDIUM
sqlite3-ruby: Possible SQL query truncation when a string is 4 GiB or larger
- CVE-2026-126354MEDIUM
Addressable URI normalization resolves some dotted path segments to the wrong path
- CVE-2026-115472MEDIUM
Doorkeeper: When using public clients, any client can revoke any access token
- CVE-2026-126350MEDIUM
Addressable: Regular Expression Denial of Service in templates with certain exploded expressions
- CVE-2026-126351MEDIUM
Addressable: Denial of service in URI path normalization