CVE-2026-141532: Addressable URI#origin= takes the host from the userinfo

Published Dec 1, 2026
·
Updated

Impact

Addressable::URI#origin= extracts the host from the assigned origin with a pattern that stops at the first :. When the assigned value contains userinfo with a colon, the host is taken from the userinfo instead of the authority. Addressable::URI.parse reads the same string correctly, so an application that validates with parse and assigns with origin= (or the reverse) checks one host and uses another. Applications that don't pass untrusted values to origin= are unaffected.

origin= also truncated IPv6 hosts ([::1] became [) and dropped the port when a path followed. While this is not expected to have security impact, the same change fixes this bug as well.

Affected Versions

URI#origin= was introduced in Addressable 2.4.0, and the vulnerability is present in all versions with this method up through 2.9.2. It is fixed in 2.10.0.

Workarounds

- Don't pass untrusted values to origin=. Parse them with Addressable::URI.parse or Addressable::URI.heuristicparse and assign scheme, host and port individually if needed. - Reject origins that contain an @ character.

Credits

Reported by Praneeth (@praneeth-bala), UCSB SecLab.

Other sources

Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.4.0 until 2.10.0, Addressable::URI#origin= parses an assigned origin with a pattern that can take the host from colon-containing userinfo instead of from the authority. An application that validates the same string with Addressable::URI.parse but assigns it with origin= can check one host and use another. This issue is fixed in version 2.10.0.

— MITRE

Affected Software

2 affected componentsFixes available
rubygems/addressable>=2.4.0<2.10.0
rubygems/addressable>=2.4.0<=2.9.2
2.10.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rubygems/addressable to a version that resolves this vulnerability.

    Fixed in 2.10.0
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.10.0
  3. Compensating control

    Until upgrading, do not pass untrusted values to Addressable::URI#origin= and reject origins containing `@`. Where needed, parse values with Addressable::URI.parse or Addressable::URI.heuristic_parse and assign scheme, host, and port individually.

Event History

Dec 1, 2026
CVE Published
via MITRE·09:17 PM
Data Sourced
via MITRE·09:17 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:18 PM
DescriptionSeverityWeakness
Dec 2, 2026
Advisory Published
via GitHub·12:28 AM
Data Sourced
via GitHub·12:28 AM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which applications are realistically exposed to this issue?

Applications using Addressable versions from 2.4.0 up to, but not including, 2.10.0 are exposed if they validate a URI using Addressable::URI.parse and then assign the same value through Addressable::URI#origin=. The impact is host-validation bypass: the application can validate one host while using another.

2

What input is needed to exploit the issue?

The assigned origin must contain userinfo with a colon. Under the affected origin= parsing behavior, the host can be taken from that colon-containing userinfo rather than from the URI authority.

3

How can this be remediated?

Upgrade Addressable to version 2.10.0, which fixes the issue. If an upgrade cannot happen immediately, avoid relying on a host validation performed by Addressable::URI.parse when the URI will subsequently be assigned through origin=.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203