MEDIUM · CVSS 3.1 4.8EPSS 0.3% · 22th percentileCWE-22CWE-436
CVE-2026-126354: Addressable URI normalization resolves some dotted path segments to the wrong path
Published 2026-11-12 · Updated 2026-11-12 · Also known as GHSA-8gmh-2hhj-2hv9
Summary
Addressable URI normalization incorrectly resolves paths containing certain dotted path segments leading to path traversal and interpretation conflicts. Engineering teams using Addressable to validate or allowlist paths before forwarding them to standard RFC 3986 resolvers must update their libraries.
Who is affected
Deployments using the RubyGems addressable library between versions 2.2.5 and 2.9.0 are affected. An application is vulnerable when it makes security access decisions based on a path normalized or joined by Addressable, but sends the original unnormalized URI to a backend component or HTTP client that resolves dot segments strictly according to RFC 3986.
Exploitability
The vulnerability has a CVSS 3.1 base score of 4.8 (MEDIUM) with a vector of AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N, indicating network accessibility with high attack complexity and no privileges required. The EPSS score is 0.003 (percentile 0.221), and it is not listed in the CISA Known Exploited Vulnerabilities catalog.
Remediation
Upgrade the RubyGems addressable package to version 2.9.1.
Reject paths containing '..' segments or use the same normalized value for both access checks and outgoing requests as a workaround.
How to check your project
Inspect application dependency lockfiles (such as Gemfile.lock) to check if the 'addressable' gem version falls within the range 2.2.5 through 2.9.0.
Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
Ecosystem
Package
Affected versions
Fixed in
Upgrade
RubyGems
addressable
>= 2.2.5, < 2.9.1
2.9.1
bundle update addressable
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None
FAQ
Which package and versions are affected?
The RubyGems package 'addressable' is affected from version 2.2.5 up to and including version 2.9.0.
What is the root cause of this vulnerability?
The flaw is an interpretation conflict (CWE-436) where Addressable::URI.normalize_path improperly removes leading dot segments, causing divergence from RFC 3986 and potentially leading to path traversal (CWE-22).
Is this vulnerability actively being exploited in the wild?
No, CISA Known Exploited Vulnerabilities tracking indicates no active exploitation.
Original advisory description
### 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 `/`:
```ruby
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 removes `x` and `public`, 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
```ruby
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.