# GHSA-CWMP-X65R-27FV: Addressable URI#origin= takes the host from the userinfo

- Database: GitHub
- Severity: CVSS 3.7 (Low)
- Published: 2026-12-02
- Modified: 2026-12-02

## Tracked as

- [CVE-2026-141532](https://cve.now/CVE-2026-141532.md): Addressable URI#origin= takes the host from the userinfo

## Affected versions

- addressable (RubyGems): from 2.4.0, fixed in 2.10.0

## Description

### 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.heuristic_parse` and assign `scheme`, `host` and `port` individually if needed.
- Reject origins that contain an `@` character.

### Credits

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

## References

- https://github.com/sporkmonger/addressable/security/advisories/GHSA-cwmp-x65r-27fv
- https://github.com/sporkmonger/addressable/commit/56454dd45398d23402243e85ec860d8a6caedbd1
- https://github.com/sporkmonger/addressable
- https://github.com/sporkmonger/addressable/releases/tag/addressable-2.10.0

Page: https://cve.now/GHSA-CWMP-X65R-27FV

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
