All vulnerabilities

RubyGems

CVE-2026-141526

Addressable: Regular Expression Denial of Service in templates with exploded variables next to other variables

Severity
Medium 5.9
Published
1 Dec 2026
Last changed
2 Dec 2026
Added to UpHeron
2 Dec 2026
Fixed in
2.10.0
Exploit chance
0.8% in the next 30 daysHigher than 59% of CVEs. EPSS by FIRST, 2 Dec 2026
Weakness
Regular expression denial of service (ReDoS) (CWE-1333)
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-xfg6-27c4-wr4r
Sources
OSV.dev and GitHub

Description

Within the URI template implementation in Addressable, some templates with exploded variables still generate regular expressions vulnerable to excessive backtracking. GHSA-4w5q-wg7v-w6gp reported expressions with several exploded variables and listed 2.9.1 as patched, but its fix didn't cover these shapes:

  • An exploded expression directly before an expression with exploded variables (e.g., {a*}{.a*,b*,c}), which is cubic in the input length.
  • Several exploded variables in a . or default expression (e.g., {.a*,b*,c}, which is quadratic, or {c*,d*,a*}, which is cubic).
  • An unexploded variable between exploded ones in a ? or & expression (e.g., {?a*,b,c*}), which is quadratic in the number of members.
  • An exploded variable followed by unexploded ones in a /, . or default expression (e.g., {a*,b,c}-), which is quadratic.

A run of members can be divided among the variables in many ways. When Template#match or Template#extract is called with a maliciously crafted URI, this can result…

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

  • Upgrade to MRI Ruby 3.3 or later, if your application does not use JRuby.
  • Avoid matching user-supplied input on unpatched versions of the library against templates with an exploded variable and another variable in the same expression, or with an exploded expression directly before another expression.
  • Limit the length of user-supplied URIs before matching them. Because the cost is polynomial, this only bounds it, but it works on every runtime.
  • Apply a short timeout, such as Timeout.timeout, around any call to Template#match or Template#extract that processes user-supplied data.
Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
addressableRubyGems · osv:RubyGems:addressable
  • From 2.3.0 before 2.10.0

About addressable

Total downloads (RubyGems)
1,323,514,580RubyGems, 1 Dec 2026

References