CVE-2026-141525: Addressable Denial of Service Vulnerability
MODERATECVE-2026-141525 is a MODERATE (CVSS 5.9) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Addressable libraries in the RubyGems ecosystem. The issue involves regular expression denial of service in addressable templates on mri ruby 3.2 and truffleruby. Remediation is available by upgrading affected packages to version 2.10.0.
CVE-2026-141525 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-141525
To remediate this vulnerability, upgrade all affected Addressable dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade addressable to 2.10.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for addressable
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-141525, inspect your project dependencies for Addressable:
inspect dependencies for addressable
Analyze the terminal output to locate any version of Addressable in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Addressable, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-141525 Affected Addressable Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
addressable
|
RubyGems |
≥ 2.9.1
< 2.10.0
|
2.10.0
|
References
Frequently Asked Questions
What is CVE-2026-141525?
Which Addressable versions are affected?
What version fixes CVE-2026-141525?
Is addressable affected?
What is the CVSS score of CVE-2026-141525?
What CWE is associated with CVE-2026-141525?
How can I check RubyGems dependencies for CVE-2026-141525?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jrfq-gw62-2f3j",
"modified" : "2026-12-01T23:38:16Z",
"published" : "2026-12-01T23:38:16Z",
"aliases" : [ "CVE-2026-141525" ],
"summary" : "Addressable: Regular Expression Denial of Service in Addressable templates on MRI Ruby 3.2 and TruffleRuby",
"details" : "### Impact\n\nAddressable 2.9.1 changed the regular expressions generated for URI templates to fix GHSA-9f42-57jx-vpp3 and GHSA-4w5q-wg7v-w6gp. The new regular expressions contain lookaround assertions for some expressions, such as `{a}{b}`, `{a,b}`, `{/a,b}`, `{?a*,b}` and expressions with an exploded variable followed by unexploded ones. MRI Ruby 3.2 doesn't memoize a regular expression that contains a lookaround, and memoization is decided for the whole template's regular expression, so one such expression makes the rest of the template backtrack as on older Rubies. TruffleRuby 40.0 also backtracks for some of these regular expressions.\n\nAs a result, templates that 2.9.0 matched in linear time on these runtimes are polynomial since 2.9.1. On MRI Ruby 3.2, this includes templates that combine a common shape with one of those expressions, such as `/{year}-{month}-{day}/{a}{b}`. 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.\n\nWith 2.9.2, on MRI Ruby 3.2:\n\n- `/{year}-{month}-{day}/{a}{b}` takes 12 seconds to reject 2 KB of input. With 2.9.0, it takes under 0.001 seconds.\n- `{?a,a*,a*}{a*}{.a*,b*,c}` takes over 15 seconds to reject 2 KB of input. With 2.9.0, it takes 0.001 seconds.\n- `{?a*,b,c*}` takes about 1 second to reject 19 KB of input. With 2.9.0, it takes 0.003 seconds.\n- `{a,b}{c,d}{e,f}` takes 2.9 seconds to reject 1 KB of input. With 2.9.0, it takes under 0.001 seconds.\n\nOn TruffleRuby 40.0, `{?a,a*,a*}{a*}{.a*,b*,c}` takes over 10 minutes to reject 2 KB of input, and `{?a*,b,c*}` takes 7.7 seconds to reject 19 KB. With 2.9.0, each takes under 0.01 seconds.\n\nUsers of the URI parsing capabilities in Addressable but not the URI template matching capabilities are unaffected. Users who only call `Template#expand` are unaffected.\n\n### Affected Versions\n\nThis vulnerability affects Addressable >= 2.9.1, including 2.9.2, on MRI Ruby 3.2 and TruffleRuby 40.0. It is fixed in 2.10.0, with two exceptions where matching can still take polynomial time on MRI Ruby < 3.3, JRuby and TruffleRuby: when a processor's `match` method gives a variable its own pattern, since 2.10.0 then keeps every choice open, as earlier versions did, so that the pattern decides the values; and for some templates that combine an exploded variable, or several variables in one expression, with other expressions, such as `{+c*,d}{&b}.{b}`.\n\nMRI Ruby 3.3 and later memoize regular expressions with lookarounds and are not affected. On MRI Ruby < 3.2 and JRuby, which don't memoize, these templates were already slow with 2.9.0 and are covered by GHSA-xj9m-f88p-5j38, GHSA-xfg6-27c4-wr4r and GHSA-grhv-8jgq-r74x. MRI Ruby 3.2 reached its end of life on 2026-03-31. Earlier TruffleRuby versions were not tested.\n\nThis has been confirmed on the following runtimes with Addressable 2.9.2:\n\n| Runtime | Status |\n|---------|--------|\n| MRI Ruby 2.7 | Not affected by this issue |\n| MRI Ruby 3.1 | Not affected by this issue |\n| MRI Ruby 3.2 | Vulnerable |\n| MRI Ruby 3.3 | Not affected |\n| MRI Ruby 4.0 | Not affected |\n| JRuby 9.4 | Not affected by this issue |\n| TruffleRuby 40.0 | Vulnerable |\n\n### Workarounds\n\n- Upgrade to MRI Ruby 3.3 or later.\n- 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.\n- On MRI Ruby 3.2, apply a short timeout, such as `Timeout.timeout`, around any call to `Template#match` or `Template#extract` that processes user-supplied data. It interrupts the matching thread at an arbitrary point, so it isn't safe in every application. On TruffleRuby, it doesn't stop a regular expression match.\n- On MRI Ruby 3.2, setting `Regexp.timeout` makes a slow match raise `Regexp::TimeoutError`. It applies to every regular expression in the process.\n\n### Credits\n\nFound by Bob Aman (@sporkmonger).\n\n### For more information\n\nIf there are any questions or comments about this advisory:\n* [Open an issue](https://github.com/sporkmonger/addressable/issues)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "addressable"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.9.1"
}, {
"fixed" : "2.10.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.9.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/sporkmonger/addressable/security/advisories/GHSA-jrfq-gw62-2f3j"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-141525"
}, {
"type" : "WEB",
"url" : "https://github.com/sporkmonger/addressable/commit/576662e4791df3cfd17c944041a98f516d3c0734"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sporkmonger/addressable"
}, {
"type" : "WEB",
"url" : "https://github.com/sporkmonger/addressable/releases/tag/addressable-2.10.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-01T23:38:16Z",
"nvd_published_at" : "2026-12-01T21:17:12Z"
}
}