Every CVESearch/Get API key

CVE-2026-141529

Addressable::Template builds its regexp in quadratic time for patterns with non-ASCII characters

Explain with AI
ChatGPTClaudeGoogle AI
Severity
3.7Low
Network attack, no privileges, no user interactionCVSS 3.1, CVE List
Exploitation
Unknown
No source reports exploitation yet.
Exploit chance
0.73% in 30 days
Percentile55th
EPSS, scored
Listed fix
2.10.0 for addressable
From 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::Template builds its cached regular expression in quadratic time when an untrusted template pattern contains non-ASCII text or a long run of adjacent expressions. Operations that compile or inspect such templates, including match, extract, to_regexp, variables, variable_defaults, and freeze, can consume excessive CPU and cause denial of service. 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
Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L

Exploit chance over time

Up 0.1 points since Dec 2, 2026
EPSS score, scored every day from Dec 2, 2026 to Dec 4, 2026: lowest 0.64% on Dec 2, 2026, highest 0.73% on Dec 4, 2026, 0.73% on the last day.

Affected

Packages 51

Affected packages
PackageAffectedFixed
addressable
RubyGems
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-addressable
Debian: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-18
Docker 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 less
18.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-18
Docker 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 less
18.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-19
Docker 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 less
19.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-19
Docker 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 less
19.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.19
Docker 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.20
Docker 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.19
Docker 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
Affected packages
PackageAffectedFixed
fluentd-kubernetes-daemonset-cloudwatch-1.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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.19
Docker 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.20
Docker 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-18
Docker 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 less
18.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-19
Docker 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 less
19.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-addressable
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
2.3.8-12.3.8-1ubuntu0.1~esm1
None listed
ruby-addressable
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
2.5.1-22.5.2-12.5.2-1ubuntu0.1~esm1
None listed
ruby-addressable
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
2.5.2-12.7.0-12.7.0-1ubuntu0.1~esm1
None listed
ruby-addressable
Ubuntu:Pro:22.04:LTS
All versions, plus listed versions
2.7.0-22.8.0-32.8.0-3ubuntu0.1~esm1
None listed
ruby-addressable
Ubuntu:Pro:24.04:LTS
All versions, plus listed versions
2.8.1-12.8.5-12.8.5-1ubuntu0.1~esm1
None listed
ruby-addressable
Ubuntu:26.10
All versions, plus listed versions
2.8.7-22.9.0-1
None listed
ruby-addressable
Ubuntu:Pro:26.04:LTS
All versions, plus listed versions
2.8.7-22.8.7-2ubuntu0.26.04.1~esm1
None listed

Products 2

Sources

CVE List Score usedCVSS 3.13.7

Addressable::Template builds its regexp in quadratic time for patterns with non-ASCII characters

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::Template builds its cached regular expression in quadratic time when an untrusted template pattern contains non-ASCII text or a long run of adjacent expressions. Operations that compile or inspect such templates, including match, extract, to_regexp, variables, variable_defaults, and freeze, can consume excessive CPU and cause denial of service. This issue is fixed in version 2.10.0.

Record
CVE-2026-141529
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-407
Updated
2026-12-02
EUVDEUVD-2026-140686CVSS 3.13.7

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::Template builds its cached regular expression in quadratic time when an untrusted template pattern contains non-ASCII text or a long run of adjacent expressions. Operations that compile or inspect such templates, including match, extract, to_regexp, variables, variable_defaults, and freeze, can consume excessive CPU and cause denial of service. This issue is fixed in version 2.10.0.

Record
EUVD-2026-140686
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Updated
2026-12-02
GitHub AdvisoriesGHSA-h78h-gj97-g737CVSS 3.13.7

Addressable::Template builds its regexp in quadratic time for patterns with non-ASCII characters or many adjacent expressions

Impact

Addressable::Template builds a regular expression from its pattern the first time it's needed, by #match, #extract, #to_regexp, #variables (and its aliases #keys and #names), #variable_defaults or #freeze. When the pattern has non-ASCII characters, or a long run of expressions with no literal text between them (such as {a}{b}{c}), building it takes time quadratic in the pattern's length. A non-ASCII pattern of a few hundred kilobytes takes seconds on MRI and longer on JRuby. A run of 5,000 expressions, 15 KB, takes about 4 seconds on MRI and 8 seconds on JRuby. Other templates build in linear time.

The cost is in the pattern, not in the URI being matched, so only an application that builds templates from untrusted input is affected. Matching untrusted URIs against the application's own templates isn't. The regular expression is cached on the template, so the cost is paid once per template, except that #match and #extract with a processor build it on every call. #expand and #partial_expand don't build it and aren't affected.

Templates from untrusted sources are uncommon, and the attacker needs a pattern of many kilobytes to cause a delay of seconds, so attack complexity is high.

Affected Versions

This vulnerability affects Addressable >= 2.9.1. Version 2.9.1 added a step that looks at what follows each expression. It finds each expression's position by character offset, and for each expression it looks through every later expression with no literal text before it, so either kind of pattern makes building the regular expression quadratic. It is fixed in 2.10.0, where the step works in byte offsets and in a single pass.

Workarounds

  • Don't match, extract, list the variables of or freeze templates from untrusted sources, or limit their length.
  • Reject templates with non-ASCII characters, or pct-encode those characters before building the template, and reject templates with long runs of expressions next to each other.

Proof of Concept

require "addressable/template"

[10_000, 20_000].each do |count|
  template = Addressable::Template.new("é{a}" * count)
  started = Process.clock_gettime(Process::CLOCK_MONOTONIC)
  template.to_regexp
  elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - started
  puts "%6d expressions: %.2fs" % [count, elapsed]
end

On affected versions, doubling the number of expressions roughly triples to quadruples the time. On fixed versions, and with a in place of é on any version, it roughly doubles.

The same holds for expressions next to each other, at smaller sizes:

require "addressable/template"

[2_500, 5_000].each do |count|
  template = Addressable::Template.new("{a}" * count)
  started = Process.clock_gettime(Process::CLOCK_MONOTONIC)
  template.to_regexp
  elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - started
  puts "%6d expressions: %.2fs" % [count, elapsed]
end

On affected versions, doubling the number of expressions quadruples the time. On fixed versions, and with a{a} in place of {a} on any version, it roughly doubles.

Credits

Found by Bob Aman (@sporkmonger).

For more information

If ther are any questions or comments about this advisory:

Record
GHSA-h78h-gj97-g737
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-407
Updated
2026-12-02
NVDCVSS 3.13.7

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::Template builds its cached regular expression in quadratic time when an untrusted template pattern contains non-ASCII text or a long run of adjacent expressions. Operations that compile or inspect such templates, including match, extract, to_regexp, variables, variable_defaults, and freeze, can consume excessive CPU and cause denial of service. This issue is fixed in version 2.10.0.

Record
CVE-2026-141529
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-407
Updated
2026-12-03
OSVCVSS 3.13.7

Addressable::Template builds its regexp in quadratic time for patterns with non-ASCII characters

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::Template builds its cached regular expression in quadratic time when an untrusted template pattern contains non-ASCII text or a long run of adjacent expressions. Operations that compile or inspect such templates, including match, extract, to_regexp, variables, variable_defaults, and freeze, can consume excessive CPU and cause denial of service. This issue is fixed in version 2.10.0.

Record
CVE-2026-141529
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-407
Updated
2026-12-02
OSVDEBIAN-CVE-2026-141529CVSS 3.13.7

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::Template builds its cached regular expression in quadratic time when an untrusted template pattern contains non-ASCII text or a long run of adjacent expressions. Operations that compile or inspect such templates, including match, extract, to_regexp, variables, variable_defaults, and freeze, can consume excessive CPU and cause denial of service. This issue is fixed in version 2.10.0.

Record
DEBIAN-CVE-2026-141529
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Updated
2026-12-03
OSVDHI-ywlz-2dwz-uhkj-6idsCVSS 3.13.7

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::Template builds its cached regular expression in quadratic time when an untrusted template pattern contains non-ASCII text or a long run of adjacent expressions. Operations that compile or inspect such templates, including match, extract, to_regexp, variables, variable_defaults, and freeze, can consume excessive CPU and cause denial of service. This issue is fixed in version 2.10.0.

Record
DHI-ywlz-2dwz-uhkj-6ids
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Updated
2026-12-04
OSVGHSA-h78h-gj97-g737CVSS 3.13.7

Addressable::Template builds its regexp in quadratic time for patterns with non-ASCII characters or many adjacent expressions

Impact

Addressable::Template builds a regular expression from its pattern the first time it's needed, by #match, #extract, #to_regexp, #variables (and its aliases #keys and #names), #variable_defaults or #freeze. When the pattern has non-ASCII characters, or a long run of expressions with no literal text between them (such as {a}{b}{c}), building it takes time quadratic in the pattern's length. A non-ASCII pattern of a few hundred kilobytes takes seconds on MRI and longer on JRuby. A run of 5,000 expressions, 15 KB, takes about 4 seconds on MRI and 8 seconds on JRuby. Other templates build in linear time.

The cost is in the pattern, not in the URI being matched, so only an application that builds templates from untrusted input is affected. Matching untrusted URIs against the application's own templates isn't. The regular expression is cached on the template, so the cost is paid once per template, except that #match and #extract with a processor build it on every call. #expand and #partial_expand don't build it and aren't affected.

Templates from untrusted sources are uncommon, and the attacker needs a pattern of many kilobytes to cause a delay of seconds, so attack complexity is high.

Affected Versions

This vulnerability affects Addressable >= 2.9.1. Version 2.9.1 added a step that looks at what follows each expression. It finds each expression's position by character offset, and for each expression it looks through every later expression with no literal text before it, so either kind of pattern makes building the regular expression quadratic. It is fixed in 2.10.0, where the step works in byte offsets and in a single pass.

Workarounds

  • Don't match, extract, list the variables of or freeze templates from untrusted sources, or limit their length.
  • Reject templates with non-ASCII characters, or pct-encode those characters before building the template, and reject templates with long runs of expressions next to each other.

Proof of Concept

require "addressable/template"

[10_000, 20_000].each do |count|
  template = Addressable::Template.new("é{a}" * count)
  started = Process.clock_gettime(Process::CLOCK_MONOTONIC)
  template.to_regexp
  elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - started
  puts "%6d expressions: %.2fs" % [count, elapsed]
end

On affected versions, doubling the number of expressions roughly triples to quadruples the time. On fixed versions, and with a in place of é on any version, it roughly doubles.

The same holds for expressions next to each other, at smaller sizes:

require "addressable/template"

[2_500, 5_000].each do |count|
  template = Addressable::Template.new("{a}" * count)
  started = Process.clock_gettime(Process::CLOCK_MONOTONIC)
  template.to_regexp
  elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - started
  puts "%6d expressions: %.2fs" % [count, elapsed]
end

On affected versions, doubling the number of expressions quadruples the time. On fixed versions, and with a{a} in place of {a} on any version, it roughly doubles.

Credits

Found by Bob Aman (@sporkmonger).

For more information

If ther are any questions or comments about this advisory:

Record
GHSA-h78h-gj97-g737
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-407
Updated
2026-12-02
OSVUBUNTU-CVE-2026-141529No score

(Addressable is an alternative implementation to the URI implementation ...)

Record
UBUNTU-CVE-2026-141529
Updated
2026-12-03

History

Recorded by Every CVE

Changes recorded by Every CVE
DayChangedSources
Affected packagesOSV
Affected packages, other IDs, referencesOSV
Products, referencesNVD, OSV
ReferencesOSV
Affected packages, other IDs, references
4 sourcesShow lessCVE List, EUVD, NVD, OSV
Affected packages, other IDs, referencesOSV
Affected packages, referencesOSV
Affected packages, key facts, referencesGitHub Advisories
Other IDs, referencesOSV
Other IDs, published dateEUVD, NVD
First indexedCVE List

Upstream dates may differ.

References

Show 4 more referencesShow less
MoveEnter Open