{"id":"CVE-2025-27221","published":"2025-03-03T00:00:00Z","modified":"2025-11-03T21:13:26Z","title":"In the URI gem before 1.0.3 for Ruby, the URI handling methods (URI.join, URI#merge, URI#+) have an inadvertent…","vendor":"ruby-lang","product":"URI","tier":"tail","description":{"text":"In the URI gem before 1.0.3 for Ruby, the URI handling methods (URI.join, URI#merge, URI#+) have an inadvertent leakage of authentication credentials because userinfo is retained even after changing the host.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.2,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00511,"percentile":0.44521,"provenance":"source"},"cwes":[{"id":"CWE-212","name":"Improper Removal of Sensitive Information Before Storage or Transfer"}],"references":[{"url":"https://hackerone.com/reports/2957667","tags":[]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/uri/CVE-2025-27221.yml","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00015.html","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00008.html","tags":[]}],"priority":{"score":11.1,"factors":[{"name":"EPSS percentile","points":8.9},{"name":"CVSS severity","points":2.24}]},"vendorSlug":"ruby-lang","affectedVersions":[{"vendor":"ruby-lang","product":"URI","versions":["< 0.11.3",">= 0.12.0, < 0.12.4",">= 0.13.0, < 0.13.2",">= 1.0.0, < 1.0.3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-03-04T16:38:46.135358Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"uri","vulnerableRanges":["<0.11.3",">=0.12.0, <0.12.4",">=0.13.0, <0.13.2",">=1.0.0, <1.0.3"],"patched":["0.11.3","0.12.4","0.13.2","1.0.3"],"from":["GHSA-22h5-pq3x-2gf2"],"provenance":"source"}],"summary":{"text":"The URI gem before version 1.0.3 for Ruby has a flaw in its URI handling methods (URI.join, URI#merge, and URI#+), which retain userinfo, including authentication credentials, after the host is changed. An attacker who can get a victim to use one of these methods on a crafted URI, with local access to the affected system as the attack vector, can obtain the leaked credentials, and the attack is high complexity with no privileges or user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:03:09Z"},"euvd":{"id":"EUVD-2025-5508","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-ruby-lang-uri-cve-2025-27221","children":[{"from":"CVE-2025-27221","to":"CVE-2025-61594","relation":"bypass","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"bypass","quote":"This is a a bypass for the fix to CVE-2025-27221 that can expose user credentials.","from":"CVE.org","in":"CVE-2025-61594"},{"kind":"osv-related","provenance":"source","id":"GHSA-22h5-pq3x-2gf2","via":"related"},{"kind":"osv-related","provenance":"source","id":"GHSA-j4pr-3wm6-xx2r","via":"reference","url":"https://github.com/advisories/GHSA-22h5-pq3x-2gf2"},{"kind":"version-step","provenance":"source","package":"RubyGems:uri","fromFixed":"0.12.4","toFixed":"0.12.5","daysApart":302},{"kind":"version-step","provenance":"source","package":"RubyGems:uri","fromFixed":"0.13.2","toFixed":"0.13.3","daysApart":302}]}],"packageHistory":[{"cve":"CVE-2023-28755","published":"2023-03-31","fixed":"0.12.1","kev":false},{"cve":"CVE-2023-36617","published":"2023-06-29","fixed":"0.12.2","kev":false,"link":{"from":"CVE-2023-36617","to":"CVE-2025-27221","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:uri","fromFixed":"0.12.2","toFixed":"0.12.4","daysApart":613},{"kind":"version-step","provenance":"source","package":"RubyGems:uri","fromFixed":"0.11.2","toFixed":"0.11.3","daysApart":613}]}},{"cve":"CVE-2025-27221","published":"2025-03-03","fixed":"1.0.3","kev":false},{"cve":"CVE-2025-61594","published":"2025-12-30","fixed":"1.0.4","kev":false}],"package":"RubyGems:uri"}}