RubyGems
CVE-2026-126352
Addressable: Regular Expression Denial of Service in templates with multiple variables
- Severity
- Medium 5.9
- Published
- 12 Nov 2026
- Last changed
- 12 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 2.9.1
- Exploit chance
- 0.4% in the next 30 daysHigher than 37% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H- Also known as
- GHSA-9f42-57jx-vpp3
- Sources
- OSV.dev and GitHub
Description
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.
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#match or Template#extract that processes user-supplied data.
Affected software
| Software | Affected versions |
|---|---|
addressableRubyGems · osv:RubyGems:addressable |
|
About addressable
- Total downloads (RubyGems)
- 1,317,979,305RubyGems, 24 Nov 2026
Vulnerabilities in addressable
- In our list
- 6
- Published in the last 12 months
- 6
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-126348Addressable display_uri can show misleading hosts with invalid Punycode A-labelsMedium 4.3 12 Nov 2026
- CVE-2026-126349Addressable display_uri can show misleading hosts containing bidi and invisible charactersLow 3.1 12 Nov 2026
- CVE-2026-126351Addressable: Denial of service in URI path normalizationMedium 5.9 12 Nov 2026
- CVE-2026-126350Addressable: Regular Expression Denial of Service in templates with certain exploded expressionsMedium 5.9 12 Nov 2026
- CVE-2026-126354Addressable URI normalization resolves some dotted path segments to the wrong pathMedium 4.8 12 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-126352
- GitHub Advisory Database https://github.com/advisories/GHSA-9f42-57jx-vpp3