Addressable 2.10.0 Patches Regex DoS Flaw in Ruby URI Templates

The Addressable gem, a Ruby alternative to the standard URI library, has released version 2.10.0 to fix a medium-severity denial-of-service vulnerability (CVE-2026-141525). The flaw, affecting versions 2.9.1 through 2.9.2, allows attackers to cause polynomial CPU consumption via crafted URIs on MRI Ruby 3.2 and TruffleRuby 40.0. The issue stems from regular expression memoization failures and backtracking in URI templates containing lookaround assertions. While the patch resolves the core issue, certain complex template combinations may still exhibit polynomial behavior on older or alternative Ruby runtimes. The vulnerability carries a CVSS score of 5.9 and requires no authentication or user interaction to exploit.
Key points
- CVE-2026-141525 affects Addressable versions 2.9.1 through 2.9.2, with the fix included in version 2.10.0.
- The vulnerability is a Regular Expression Denial of Service (ReDoS) issue, rated 5.9 (Medium) on the CVSS 3.1 scale.
- Exploitation requires a crafted URI passed to Template#match or Template#extract, consuming polynomial CPU time.
- The flaw specifically impacts MRI Ruby 3.2 and TruffleRuby 40.0 due to memoization loss and backtracking in lookaround assertions.
- MRI Ruby 3.3 and later are not affected, as they properly memoize regular expressions with lookarounds.
- The patch does not fully resolve polynomial behavior for certain templates combining exploded or multi-variable expressions on MRI Ruby 3.2, JRuby, and TruffleRuby.
Background
This disclosure follows a series of recent denial-of-service vulnerabilities in software components, including a medium-severity flaw in Tanium Zone Server (CVE-2026-134740) and a high-severity regex backtracking issue in HTML Minifier. The Addressable gem, which provides an alternative URI implementation for Ruby, has previously addressed similar performance issues in version 2.9.0. MRI Ruby 3.2 reached end-of-life in March 2026, making the upgrade to Ruby 3.3 or later a recommended mitigation for this and other related issues.
Why it matters
The vulnerability highlights the risks of regular expression complexity in widely used libraries, particularly when interacting with specific runtime implementations. Although the CVSS score is medium, the high attack complexity and lack of required privileges mean that any application using Addressable on affected Ruby versions could be susceptible to resource exhaustion. The partial nature of the fix for certain template combinations underscores the need for careful testing and potential workarounds, such as limiting URI length or upgrading to newer Ruby runtimes, to ensure full protection against denial-of-service attacks.
What to watch
Developers using Addressable should upgrade to version 2.10.0 immediately. For those unable to upgrade, applying workarounds such as limiting the length of user-supplied URIs or using timeout mechanisms on MRI Ruby 3.2 is recommended. Users on MRI Ruby 3.3 or later, JRuby 9.4, or MRI Ruby 2.7/3.1/4.0 are not affected by this specific issue. Monitoring for any further advisories related to the remaining polynomial behavior in complex templates is advised.
Want the full story? Read the original reporting
Read on CVEs | Zero Wire | Cloudflare Radar