All vulnerabilities

RubyGems

CVE-2026-141528

Addressable: Regular Expression Denial of Service in templates with several 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.7% in the next 30 daysHigher than 55% 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-xj9m-f88p-5j38
Sources
OSV.dev and GitHub

Description

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

  • An expression followed by text that can start with a comma: a literal comma or another expression (e.g., {+a,b,c},{+d} or {+v1,v2,v3,v4,v5,v6,v7,v8}{c*}, or, with exploded variables, {c*,d*},{+a*}). A run of commas can be divided between the expression's last variable and what follows it in O(n^2) ways, and the cost grows quickly with the number of variables, especially exploded ones.
  • An expression that repeats a variable name (e.g., {+a,c,c,c}). Its regular expression is the one 2.9.0 generated, which is cubic in the input length for this example.
  • Expressions next to each other with no literal text between them, where one has several variables (e.g., {a,b}{c} or {a,b}{c,d}{e,f}).
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 or TruffleRuby.
  • Avoid matching user-supplied input on unpatched versions of the library against templates with several variables in one + or # expression followed by a comma or another expression, with a variable name repeated in one expression, or with expressions next to each other where one has several variables.
  • 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, including TruffleRuby, where a timeout doesn't.
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