CVE-2026-126354 — Vulnerability in addressable — CVE Details
Addressable URI normalization resolves some dotted path segments to the wrong path
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.33%). Schedule for your next planned update.
Does your project use an affected addressable version?
Paste your Gemfile.lock to check it for CVE-2026-126354 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
Addressable::URI.normalize_path resolves some paths containing .. segments to a different path than RFC 3986 does. When a path climbs above the root before any other .. is resolved, the segments that later .. segments should remove are instead kept: /../../public/x/../../secret normalizes to /public/x/secret instead of /secret. URI#normalize, URI#join, URI#== and URI#=== all use this normalization. An application that checks a normalized Addressable path against an allowlist, but sends the original URI to something that resolves it according to RFC 3986, can be made to allow a request for a path outside the allowlist.
Details
normalize_path in 2.9.0 (lib/addressable/uri.rb) removes dot segments by repeating a set of rewrites until nothing changes. On each pass it finds the first /segment/../ pair with RULE_2B_2C, then replaces every textual copy of that pair in the path with /:
pair = normalized_path.match(RULE_2B_2C)
...
regexp = "/#{Regexp.escape(parent.to_s)}/\\.\\./|"
regexp += "(/#{Regexp.escape(current.to_s)}/\\.\\.$)"
...
mod ||= normalized_path.gsub!(Regexp.new(regexp), SLASH)
When the first pair found is /../../, where the "segment" is itself .., every /../../ in the path is replaced with /. That includes copies later in the path, where each .. should have removed the segment before it. For /../../public/x/../../secret:
- RFC 3986 §5.2.4 drops the two leading
..segments, which can't go above the root, then removesxandpublic, giving/secret. - 2.9.0 replaces both copies of
/../../with/in one step, giving/public/x/secret.
Paths where an ordinary /segment/../ pair comes first, such as /a/../../b/c/../../d, are resolved correctly.
This was introduced in 2.2.5. Versions 2.0.0 through 2.2.4 and earlier versions resolve these paths correctly. It is fixed in 2.9.1, which replaces the rewrite loop with a single pass that correctly follows RFC 3986 §5.2.4.
Proof of concept
require "addressable/uri"
require "uri"
url = "http://example.com/../../public/x/../../secret"
# Addressable's normalized path, compared with RFC 3986 resolution by Ruby's URI library
puts Addressable::URI.parse(url).normalize.path
puts URI.join("http://example.com/", "../../public/x/../../secret").path
# join and == use the same normalization
puts Addressable::URI.join("http://example.com/", "../../public/x/../../secret").path
puts Addressable::URI.parse(url) == Addressable::URI.parse("http://example.com/public/x/secret")
# An allowlist check on the normalized path passes, but the request reaches /secret
def allowed?(url) = Addressable::URI.parse(url).normalize.path.start_with?("/public/")
puts allowed?(url)
Output with Addressable 2.9.0:
/public/x/secret
/secret
/public/x/secret
true
true
Output with Addressable 2.9.1:
/secret
/secret
/secret
false
false
Impact
This is an interpretation conflict (CWE-436) between Addressable and other RFC 3986 resolvers, which could lead to path traversal past an allowlist (CWE-22). An application is affected when it does both of these:
- makes an access decision on a path normalized or joined by Addressable, such as "only paths under
/public/may be proxied" or "only these redirect targets are allowed"; - sends the original, unnormalized URI to a component that resolves dot segments itself, such as an HTTP client, a proxy, a web server or a browser.
An attacker may be able to bypass a check by exploiting behavioral differences between URI parsers. Impact from this is application-dependent. Applications that use Addressable's normalized form for both the check and the request are unaffected, as are applications that reject paths containing .. segments.
As a work-around for unpatched versions, before making access decisions on a path, either reject any containing .. segments, including percent-encoded forms such as %2e%2e, or use the same normalized value for both the check and the request.
Advisory Timeline
- First published November 12, 2026 (14 days ago).
- Last revised November 12, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install addressable -v 2.9.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| addressable RubyGems · Affected: 2.2.5, 2.2.6, 2.2.7, 2.2.8 (+25 more) | 2.9.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-22Path TraversalMITRE
- CWE-436
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 4.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
References
- https://github.com/sporkmonger/addressable/security/advisories/GHSA-8gmh-2hhj-2hv9WEB
- https://github.com/sporkmonger/addressable/commit/25c7c412a2f7e06c3cac92872e831f6d053703c5WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/addressable/GHSA-8gmh-2hhj-2hv9.ymlWEB
- https://github.com/sporkmonger/addressablePACKAGE
- https://github.com/sporkmonger/addressable/releases/tag/addressable-2.9.1WEB
Frequently Asked Questions
- What is CVE-2026-126354?
- Addressable URI normalization resolves some dotted path segments to the wrong path. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 4.8/10).
- How do I check if my project is affected by CVE-2026-126354?
- CVE-2026-126354 affects addressable. It has a 0.3% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-126354 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 18.3% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-35611HIGH
Addressable has a Regular Expression Denial of Service in Addressable templates
- CVE-2021-32740HIGH
Regular Expression Denial of Service in Addressable templates
- CVE-2026-128084MEDIUM
sqlite3-ruby: Possible SQL query truncation when a string is 4 GiB or larger
- CVE-2026-126352MEDIUM
Addressable: Regular Expression Denial of Service in templates with multiple variables
- CVE-2026-115472MEDIUM
Doorkeeper: When using public clients, any client can revoke any access token
- CVE-2026-126350MEDIUM
Addressable: Regular Expression Denial of Service in templates with certain exploded expressions
- CVE-2026-126351MEDIUM
Addressable: Denial of service in URI path normalization