CVE-2026-141538: Addressable URI userinfo setters store delimiters raw, so the serialized URI names a different host
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.0.0 until 2.10.0, Addressable::URI#user=, #password=, #userinfo=, and matching Addressable::URI.new options store userinfo values without rejecting or encoding host-changing delimiters. Values containing /, ?, or # can end userinfo early when Addressable::URI#tos serializes the URI. An application that validates the URI object but sends the serialized string can disclose headers or request bodies to an attacker-controlled host. This issue is fixed in version 2.10.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.10.0
Event History
Frequently Asked Questions
Which applications are realistically exposed to this issue?
Applications using Addressable versions from 2.0.0 up to, but not including, 2.10.0 are exposed when they set user, password, or userinfo values on an Addressable::URI object, validate that object, and then send its serialized to_s value in a request.
What must an attacker control to exploit it?
An attacker needs to supply a value used with Addressable::URI#user=, #password=, #userinfo=, or the corresponding Addressable::URI.new options. The supplied userinfo must contain a delimiter such as /, ?, or # that causes serialization to end userinfo early and reinterpret the resulting URI host.
What is the impact if exploitation succeeds?
A serialized URI can name an attacker-controlled host even though the application validated the URI object. Requests sent to that host may disclose headers or request bodies.
How can I determine whether an application is affected?
Check whether it uses the addressable gem below 2.10.0 and whether untrusted data can reach URI userinfo setters or matching constructor options. Test values containing /, ?, or # and compare the validated URI object with its to_s output to identify host-changing serialization.
What should be done if upgrading is not immediately possible?
Do not allow /, ?, or # in values assigned to user, password, or userinfo, and ensure these values are encoded or rejected before URI serialization. Avoid sending requests based on a serialized URI unless the final serialized destination has been validated.