CVE-2026-141525
Addressable: Regular Expression Denial of Service in Addressable templates on MRI Ruby 3. 2 and TruffleRuby
- Severity
- 5.9MediumNetwork attack, no privileges, no user interactionCVSS 3.1, CVE List
- Exploitation
- UnknownNo source reports exploitation yet.
- Exploit chance
- 0.74% in 30 daysPercentile56thEPSS, scored
- Listed fix
2.10.0for addressableFrom GitHub Advisories and OSV50 other affected packages
Overview
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.9.1 until 2.10.0, Addressable URI template regular expressions containing lookaround assertions can lose regular-expression memoization on MRI Ruby 3.2 and can backtrack on TruffleRuby 40.0. Calling Template#match or Template#extract with a crafted URI against an affected template can consume polynomial CPU time and cause denial of service. The remediation does not cover processor-supplied variable patterns or certain templates that combine exploded or multi-variable expressions with other expressions, which can remain polynomial on MRI Ruby before 3.3, JRuby, and TruffleRuby. This issue is fixed in version 2.10.0.
CVSS 3.1 vector
Exploitability
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
Impact
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HExploit chance over time
Affected
Packages 51
| Package | Affected | Fixed |
|---|---|---|
addressableRubyGems | 2.9.1 to 2.9.2 | 2.10.0 |
| 2.9.1 up to 2.10.0, plus listed versions 2.9.2 | 2.10.0 | |
ruby-addressableDebian:14 | All versions, plus listed versions 2.8.7-22.8.8-12.8.9-12.9.0-12.9.2-12.9.2-2 | None listed |
gitlab-rails-18Docker Hardened Images:Alpine:3.23 | 18.11.11-r0 and later, plus listed versions 18.11.11-r118.11.11-r218.11.12-r018.11.12-r118.11.12-r2 Show 24 more versionsShow less18.11.12-r318.11.12-r418.11.14-r018.11.14-r118.11.14-r1018.11.14-r1118.11.14-r1218.11.14-r1318.11.14-r1418.11.14-r1518.11.14-r1618.11.14-r218.11.14-r318.11.14-r418.11.14-r518.11.14-r618.11.14-r718.11.14-r818.11.14-r918.11.15-r018.11.15-r118.11.15-r218.11.15-r318.11.15-r4 | None listed |
gitlab-rails-18Docker Hardened Images:Alpine:3.24 | 18.11.11-r0 and later, plus listed versions 18.11.11-r118.11.11-r218.11.12-r018.11.12-r118.11.12-r2 Show 24 more versionsShow less18.11.12-r318.11.12-r418.11.14-r018.11.14-r118.11.14-r1018.11.14-r1118.11.14-r1218.11.14-r1318.11.14-r1418.11.14-r1518.11.14-r1618.11.14-r218.11.14-r318.11.14-r418.11.14-r518.11.14-r618.11.14-r718.11.14-r818.11.14-r918.11.15-r018.11.15-r118.11.15-r218.11.15-r318.11.15-r4 | None listed |
gitlab-rails-19Docker Hardened Images:Alpine:3.23 | 19.1.8-r0 and later, plus listed versions 19.1.8-r119.4.1-r019.4.1-r119.4.1-r219.4.1-r3 Show 27 more versionsShow less19.4.2-r019.5.3-r019.5.3-r119.5.3-r219.5.3-r319.5.3-r419.5.3-r519.5.3-r619.5.3-r719.5.3-r819.5.4-r019.5.4-r119.5.5-r019.5.5-r119.5.5-r219.5.6-r019.5.6-r119.6.0-r019.6.0-r119.6.1-r019.6.1-r119.6.1-r219.6.2-r019.6.2-r119.6.2-r219.6.2-r319.6.2-r4 | None listed |
gitlab-rails-19Docker Hardened Images:Alpine:3.24 | 19.1.8-r0 and later, plus listed versions 19.1.8-r119.4.1-r019.4.1-r119.4.1-r219.4.1-r3 Show 27 more versionsShow less19.4.2-r019.5.3-r019.5.3-r119.5.3-r219.5.3-r319.5.3-r419.5.3-r519.5.3-r619.5.3-r719.5.3-r819.5.4-r019.5.4-r119.5.5-r019.5.5-r119.5.5-r219.5.6-r019.5.6-r119.6.0-r019.6.0-r119.6.1-r019.6.1-r119.6.1-r219.6.2-r019.6.2-r119.6.2-r219.6.2-r319.6.2-r4 | None listed |
fluentd-kubernetes-daemonset-azureblob-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-azureblob-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-cloudwatch-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
Show 42 more packagesShow less
| Package | Affected | Fixed |
|---|---|---|
fluentd-kubernetes-daemonset-cloudwatch-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-datadog-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-datadog-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-elasticsearch7-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-elasticsearch7-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-elasticsearch8-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-elasticsearch8-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-forward-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-forward-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-gcs-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-gcs-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-graylog-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-graylog-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-kafka-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-kafka-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-kafka2-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-kafka2-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-kinesis-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-kinesis-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-logentries-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-logentries-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-loggly-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-loggly-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-logzio-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-logzio-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-opensearch-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-opensearch-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-papertrail-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-papertrail-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-s3-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-s3-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
fluentd-kubernetes-daemonset-syslog-1.19Docker Hardened Images:Debian:13 | 1.19.4-8 and later, plus listed versions 1.19.4-101.19.4-111.19.4-121.19.4-9 | None listed |
fluentd-kubernetes-daemonset-syslog-1.20Docker Hardened Images:Debian:13 | 1.20.1-0 and later, plus listed versions 1.20.1-11.20.1-21.20.1-31.20.1-4 | None listed |
gitlab-rails-18Docker Hardened Images:Debian:13 | 18.11.11-0 and later, plus listed versions 18.11.11-118.11.11-218.11.12-018.11.12-118.11.12-2 Show 40 more versionsShow less18.11.14-018.11.14-118.11.14-1018.11.14-1118.11.14-1218.11.14-1318.11.14-1418.11.14-1518.11.14-1618.11.14-1718.11.14-1818.11.14-1918.11.14-218.11.14-2018.11.14-2118.11.14-2218.11.14-2318.11.14-2418.11.14-2518.11.14-2618.11.14-2718.11.14-2818.11.14-2918.11.14-318.11.14-3018.11.14-3118.11.14-3218.11.14-418.11.14-518.11.14-618.11.14-718.11.14-818.11.14-918.11.15-018.11.15-118.11.15-218.11.15-318.11.15-418.11.15-518.11.15-6 | None listed |
gitlab-rails-19Docker Hardened Images:Debian:13 | 19.1.8-0 and later, plus listed versions 19.1.8-119.4.1-019.4.1-119.4.1-219.4.2-0 Show 43 more versionsShow less19.5.3-019.5.3-119.5.3-219.5.3-319.5.3-419.5.3-519.5.3-619.5.3-719.5.3-819.5.3-919.5.4-019.5.4-119.5.5-019.5.5-119.5.5-1019.5.5-1119.5.5-219.5.5-319.5.5-419.5.5-519.5.5-619.5.5-719.5.5-819.5.5-919.5.6-019.5.6-119.5.6-219.5.6-319.5.6-419.5.6-519.6.0-019.6.0-119.6.0-219.6.1-019.6.1-119.6.1-219.6.2-019.6.2-119.6.2-219.6.2-319.6.2-419.6.2-519.6.2-6 | None listed |
ruby-addressableUbuntu:Pro:16.04:LTS | All versions, plus listed versions 2.3.8-12.3.8-1ubuntu0.1~esm1 | None listed |
ruby-addressableUbuntu:Pro:18.04:LTS | All versions, plus listed versions 2.5.1-22.5.2-12.5.2-1ubuntu0.1~esm1 | None listed |
ruby-addressableUbuntu:Pro:20.04:LTS | All versions, plus listed versions 2.5.2-12.7.0-12.7.0-1ubuntu0.1~esm1 | None listed |
ruby-addressableUbuntu:Pro:22.04:LTS | All versions, plus listed versions 2.7.0-22.8.0-32.8.0-3ubuntu0.1~esm1 | None listed |
ruby-addressableUbuntu:Pro:24.04:LTS | All versions, plus listed versions 2.8.1-12.8.5-12.8.5-1ubuntu0.1~esm1 | None listed |
ruby-addressableUbuntu:26.10 | All versions, plus listed versions 2.8.7-22.9.0-1 | None listed |
ruby-addressableUbuntu:Pro:26.04:LTS | All versions, plus listed versions 2.8.7-22.8.7-2ubuntu0.26.04.1~esm1 | None listed |
Products 1
Sources
CVE List Score usedCVSS 3.15.9
Addressable: Regular Expression Denial of Service in Addressable templates on MRI Ruby 3.2 and TruffleRuby
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.9.1 until 2.10.0, Addressable URI template regular expressions containing lookaround assertions can lose regular-expression memoization on MRI Ruby 3.2 and can backtrack on TruffleRuby 40.0. Calling Template#match or Template#extract with a crafted URI against an affected template can consume polynomial CPU time and cause denial of service. The remediation does not cover processor-supplied variable patterns or certain templates that combine exploded or multi-variable expressions with other expressions, which can remain polynomial on MRI Ruby before 3.3, JRuby, and TruffleRuby. This issue is fixed in version 2.10.0.
- Record
CVE-2026-141525- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-12-02
EUVDEUVD-2026-140735CVSS 3.15.9
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.9.1 until 2.10.0, Addressable URI template regular expressions containing lookaround assertions can lose regular-expression memoization on MRI Ruby 3.2 and can backtrack on TruffleRuby 40.0. Calling Template#match or Template#extract with a crafted URI against an affected template can consume polynomial CPU time and cause denial of service. The remediation does not cover processor-supplied variable patterns or certain templates that combine exploded or multi-variable expressions with other expressions, which can remain polynomial on MRI Ruby before 3.3, JRuby, and TruffleRuby. This issue is fixed in version 2.10.0.
- Record
EUVD-2026-140735- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-12-02
GitHub AdvisoriesGHSA-jrfq-gw62-2f3jCVSS 3.15.9
Addressable: Regular Expression Denial of Service in Addressable templates on MRI Ruby 3.2 and TruffleRuby
Impact
Addressable 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.
As 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.
With 2.9.2, on MRI Ruby 3.2:
/{year}-{month}-{day}/{a}{b}takes 12 seconds to reject 2 KB of input. With 2.9.0, it takes under 0.001 seconds.{?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.{?a*,b,c*}takes about 1 second to reject 19 KB of input. With 2.9.0, it takes 0.003 seconds.{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.
On 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.
Users of the URI parsing capabilities in Addressable but not the URI template matching capabilities are unaffected. Users who only call Template#expand are unaffected.
Affected Versions
This 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}.
MRI 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.
This has been confirmed on the following runtimes with Addressable 2.9.2:
| Runtime | Status | |---------|--------| | MRI Ruby 2.7 | Not affected by this issue | | MRI Ruby 3.1 | Not affected by this issue | | MRI Ruby 3.2 | Vulnerable | | MRI Ruby 3.3 | Not affected | | MRI Ruby 4.0 | Not affected | | JRuby 9.4 | Not affected by this issue | | TruffleRuby 40.0 | Vulnerable |
Workarounds
- Upgrade to MRI Ruby 3.3 or later.
- 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.
- On MRI Ruby 3.2, apply a short timeout, such as
Timeout.timeout, around any call toTemplate#matchorTemplate#extractthat 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. - On MRI Ruby 3.2, setting
Regexp.timeoutmakes a slow match raiseRegexp::TimeoutError. It applies to every regular expression in the process.
Credits
Found by Bob Aman (@sporkmonger).
For more…
- Record
GHSA-jrfq-gw62-2f3j- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-12-02
NVDCVSS 3.15.9
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.9.1 until 2.10.0, Addressable URI template regular expressions containing lookaround assertions can lose regular-expression memoization on MRI Ruby 3.2 and can backtrack on TruffleRuby 40.0. Calling Template#match or Template#extract with a crafted URI against an affected template can consume polynomial CPU time and cause denial of service. The remediation does not cover processor-supplied variable patterns or certain templates that combine exploded or multi-variable expressions with other expressions, which can remain polynomial on MRI Ruby before 3.3, JRuby, and TruffleRuby. This issue is fixed in version 2.10.0.
- Record
CVE-2026-141525- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-12-02
OSVCVSS 3.15.9
Addressable: Regular Expression Denial of Service in Addressable templates on MRI Ruby 3.2 and TruffleRuby
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.9.1 until 2.10.0, Addressable URI template regular expressions containing lookaround assertions can lose regular-expression memoization on MRI Ruby 3.2 and can backtrack on TruffleRuby 40.0. Calling Template#match or Template#extract with a crafted URI against an affected template can consume polynomial CPU time and cause denial of service. The remediation does not cover processor-supplied variable patterns or certain templates that combine exploded or multi-variable expressions with other expressions, which can remain polynomial on MRI Ruby before 3.3, JRuby, and TruffleRuby. This issue is fixed in version 2.10.0.
- Record
CVE-2026-141525- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-12-02
OSVDEBIAN-CVE-2026-141525CVSS 3.15.9
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.9.1 until 2.10.0, Addressable URI template regular expressions containing lookaround assertions can lose regular-expression memoization on MRI Ruby 3.2 and can backtrack on TruffleRuby 40.0. Calling Template#match or Template#extract with a crafted URI against an affected template can consume polynomial CPU time and cause denial of service. The remediation does not cover processor-supplied variable patterns or certain templates that combine exploded or multi-variable expressions with other expressions, which can remain polynomial on MRI Ruby before 3.3, JRuby, and TruffleRuby. This issue is fixed in version 2.10.0.
- Record
DEBIAN-CVE-2026-141525- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-12-03
OSVDHI-ythi-he73-we56-tdzdCVSS 3.15.9
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From…
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.9.1 until 2.10.0, Addressable URI template regular expressions containing lookaround assertions can lose regular-expression memoization on MRI Ruby 3.2 and can backtrack on TruffleRuby 40.0. Calling Template#match or Template#extract with a crafted URI against an affected template can consume polynomial CPU time and cause denial of service. The remediation does not cover processor-supplied variable patterns or certain templates that combine exploded or multi-variable expressions with other expressions, which can remain polynomial on MRI Ruby before 3.3, JRuby, and TruffleRuby. This issue is fixed in version 2.10.0.
- Record
DHI-ythi-he73-we56-tdzd- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-12-04
OSVGHSA-jrfq-gw62-2f3jCVSS 3.15.9
Addressable: Regular Expression Denial of Service in Addressable templates on MRI Ruby 3.2 and TruffleRuby
Impact
Addressable 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.
As 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.
With 2.9.2, on MRI Ruby 3.2:
/{year}-{month}-{day}/{a}{b}takes 12 seconds to reject 2 KB of input. With 2.9.0, it takes under 0.001 seconds.{?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.{?a*,b,c*}takes about 1 second to reject 19 KB of input. With 2.9.0, it takes 0.003 seconds.{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.
On 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.
Users of the URI parsing capabilities in Addressable but not the URI template matching capabilities are unaffected. Users who only call Template#expand are unaffected.
Affected Versions
This 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}.
MRI 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.
This has been confirmed on the following runtimes with Addressable 2.9.2:
| Runtime | Status | |---------|--------| | MRI Ruby 2.7 | Not affected by this issue | | MRI Ruby 3.1 | Not affected by this issue | | MRI Ruby 3.2 | Vulnerable | | MRI Ruby 3.3 | Not affected | | MRI Ruby 4.0 | Not affected | | JRuby 9.4 | Not affected by this issue | | TruffleRuby 40.0 | Vulnerable |
Workarounds
- Upgrade to MRI Ruby 3.3 or later.
- 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.
- On MRI Ruby 3.2, apply a short timeout, such as
Timeout.timeout, around any call toTemplate#matchorTemplate#extractthat 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. - On MRI Ruby 3.2, setting
Regexp.timeoutmakes a slow match raiseRegexp::TimeoutError. It applies to every regular expression in the process.
Credits
Found by Bob Aman (@sporkmonger).
For more…
- Record
GHSA-jrfq-gw62-2f3j- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-12-02
OSVUBUNTU-CVE-2026-141525No score
(Addressable is an alternative implementation to the URI implementation ...)
- Record
UBUNTU-CVE-2026-141525- Updated
- 2026-12-03
The JSON record also has the rest of 2 source descriptions.
History
Recorded by Every CVE
| Day | Changed | Sources |
|---|---|---|
| Affected packages | OSV | |
| Affected packages | OSV | |
| Affected packages, other IDs, references | OSV | |
| References | OSV | |
| Affected packages, other IDs, references | 4 sourcesShow lessCVE List, EUVD, NVD, OSV | |
| Affected packages, other IDs, references | OSV | |
| Affected packages, references | OSV | |
| Affected packages, key facts, references | GitHub Advisories | |
| Other IDs, published date | EUVD | |
| Other IDs, references | NVD, OSV | |
| First indexed | CVE List |
Upstream dates may differ.
References
github.com/sporkmonger/addressable/security/advisories/GHSA-jrfq-gw62-2f3j
github.com/sporkmonger/addressable/commit/576662e4791df3cfd17c944041a98f516d3c0734
github.com/sporkmonger/addressable/releases/tag/addressable-2.10.0
nvd.nist.gov/vuln/detail/CVE-2026-141525
github.com/advisories/GHSA-jrfq-gw62-2f3j
github.com/CVEProject/cvelistV5/tree/main/cves/2026/141xxx/CVE-2026-141525.json
security-tracker.debian.org/tracker/CVE-2026-141525
scout.docker.com/v/DHI-ythi-he73-we56-tdzd