Addressable: Denial of service in URI path normalization
Published 12 Nov 2026 · Updated 12 Nov 2026
Is your project on an affected addressable?
Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <2.9.1
- Fixed in
- 2.9.1
bundle update --conservative addressable # Gemfile: '>= 2.9.1'Details
Impact
Addressable::URI.normalize_path takes time quadratic in the number of nested dot segments in a path (e.g., "/" + "a/" * n + "../" * n, which for n = 3 is /a/a/a/../../../), because it removes one dot segment per pass over the whole path. URI#normalize, URI#normalized_path, URI#==, URI#=== and URI#join all call it. Normalizing, comparing or joining a URI taken from user input can result in uncontrolled resource consumption, leading to denial of service. On 2.9.0, normalizing a 34 KB path takes about 3.5 seconds on MRI Ruby 4.0, and the cost grows with the square of the path length.
This affects every Ruby implementation, including MRI Ruby 3.2 and later. URI.parse by itself is unaffected, as is code that never normalizes, compares, or joins URIs from untrusted sources.
Affected Versions
This vulnerability affects all versions of Addressable prior to 2.9.1. It is fixed in 2.9.1.
Workarounds
- Limit the length of URIs taken from user input before calling
normalize,==orjoinon them. Web servers often limit request lines to about 8 KB, which keeps the cost to about 150 milliseconds per call on typical hardware, but URIs from other sources (request bodies, headers such asLocation, stored data) may not be limited. - Reject paths with many dot segments before normalizing them.
Credits
Reported by Matthew Mongeau (@halogenandtoast), Ruby Central Gem Security, who also suggested the single-pass approach used in the fix.
For more information
If there are any questions or comments about this advisory:
Is GHSA-qq38-m9mg-xjj5 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected addressable, and gives you the command that fixes it.
More advisories for addressable
- MediumCVE-2026-126348Addressable display_uri can show misleading hosts with invalid Punycode A-labels · 12 Nov 2026
- LowCVE-2026-126349Addressable display_uri can show misleading hosts containing bidi and invisible characters · 12 Nov 2026
- MediumCVE-2026-126350Addressable: Regular Expression Denial of Service in templates with certain exploded expressions · 12 Nov 2026
- MediumCVE-2026-126352Addressable: Regular Expression Denial of Service in templates with multiple variables · 12 Nov 2026
- MediumCVE-2026-126354Addressable URI normalization resolves some dotted path segments to the wrong path · 12 Nov 2026
- HighCVE-2026-35611Addressable has a Regular Expression Denial of Service in Addressable templates · 8 Apr 2026
References
- Linkgithub.com/sporkmonger/addressable/security/advisories/GHSA-qq38-m9mg-xjj5
- Linkgithub.com/sporkmonger/addressable/commit/25c7c412a2f7e06c3cac92872e831f6d053703c5
- Linkgithub.com/rubysec/ruby-advisory-db/blob/master/gems/addressable/GHSA-qq38-m9mg-xjj5.yml
- Packagegithub.com/sporkmonger/addressable
- Linkgithub.com/sporkmonger/addressable/releases/tag/addressable-2.9.1
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.