UBUNTU-CVE-2026-126352: Medium severity ubuntu/ruby-addressable vulnerability
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.3.0 until 2.9.1, URI templates with several variables in one expression or several adjacent expressions generate ambiguous regular expressions. Affected forms include multi-variable expressions using operators other than plus and number sign, large plus or number-sign expressions, and adjacent single-variable expressions. Template#match or Template#extract can backtrack polynomially or exponentially on attacker-controlled URIs, causing denial of service on MRI Ruby before 3.2 and JRuby, with the large plus and number-sign form also affecting MRI Ruby 3.2 and TruffleRuby 40.0. URI parsing and Template#expand are unaffected. This issue is fixed in version 2.9.1.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
addressableto a version that resolves this vulnerability.Fixed in 2.9.1
Event History
Frequently Asked Questions
Which applications are realistically exposed to denial of service?
Applications using Addressable URI templates and calling Template#match or Template#extract on attacker-controlled URIs are exposed. URI parsing and Template#expand are not affected.
What does an attacker need to trigger the issue?
An attacker needs to supply a URI that is evaluated by Template#match or Template#extract against an affected template. No authentication or user interaction is required according to the provided vector, but exploitation requires templates with the affected expression forms.
Are all Ruby runtimes affected in the same way?
MRI Ruby before 3.2 and JRuby are affected by the listed ambiguous template forms. MRI Ruby 3.2 and TruffleRuby 40.0 are affected by the large plus or number-sign expression form.
What template patterns should be prioritized for review if patching is delayed?
Prioritize multi-variable expressions using operators other than plus or number sign, large plus or number-sign expressions, and adjacent single-variable expressions. Avoid passing untrusted URIs to Template#match or Template#extract for those templates until Addressable is updated.
What version contains the fix?
The issue is fixed in Addressable version 2.9.1.