All vulnerabilities

RubyGems

CVE-2026-126350

Addressable: Regular Expression Denial of Service in templates with certain exploded expressions

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 36% of CVEs. EPSS by FIRST, 24 Nov 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-j82w-28jv-3pmj
Sources
OSV.dev and GitHub

Description

Within the URI template implementation in Addressable, templates using the (explode) modifier with the /, ., ;, ? or & operators (e.g., {/segments}, {.ext*}, {;params*}, {?query*}) generate regular expressions vulnerable to catastrophic backtracking. When Template#match or Template#extract` is called with a maliciously crafted URI that starts with the operator's leading character, matching takes exponential time, leading to uncontrolled resource consumption and denial of service. An input under 60 bytes is enough to occupy a thread for minutes.

GHSA-h27x-rffw-24p4 (CVE-2026-35611) reported this pattern as fully remediated in 2.9.0. The 2.9.0 fix only made the joiner between exploded members mandatory for templates without an operator, and its regression specs used inputs that never start with the operator's leading character, so the vulnerable part of the expression was never reached. This issue was originally reported in #364 by @ebenoist in 2019 but insufficiently investigated.

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

Workarounds

  • Upgrade to MRI Ruby 3.2 or later, if the consuming application does not use JRuby.
  • Avoid matching user-supplied input on unpatched versions of the library against templates that use the * modifier with the /, ., ;, ? or & operators.
  • Apply a short 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.9.1

About addressable

Total downloads (RubyGems)
1,317,979,305RubyGems, 24 Nov 2026

References