All vulnerabilities

RubyGems

CVE-2026-141532

Addressable URI#origin= takes the host from the userinfo

Severity
Low 3.7
Published
2 Dec 2026
Last changed
2 Dec 2026
Added to UpHeron
2 Dec 2026
Fixed in
2.10.0
Weakness
CWE-436
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Change some data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Also known as
GHSA-cwmp-x65r-27fv
Sources
OSV.dev and GitHub

Description

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.

From the GitHub Advisory Database, CC BY 4.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.
Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
addressableRubyGems · osv:RubyGems:addressable
  • From 2.4.0 before 2.10.0

About addressable

Total downloads (RubyGems)
1,323,514,580RubyGems, 1 Dec 2026

References