# CVE-2025-27221: URI allows for userinfo Leakage in URI#join, URI#merge, and URI#+

- Severity: Low 3.2 (CVSS:3.1, scored by mitre) `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.51%, higher than 45% of CVEs (2026-12-01)
- Published: 2025-03-03T00:00:00.000Z
- Modified: 2026-09-10T03:50:06.344Z
- Also known as: GHSA-22h5-pq3x-2gf2
- Related: CVE-2025-61594
- Weaknesses: CWE-200, CWE-212
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- ruby-lang URI: before 0.11.3; from 0.12.0 before 0.12.4; from 0.13.0 before 0.13.2; from 1.0.0 before 1.0.3
- uri (RubyGems): before 0.11.3; from 0.12.0 before 0.12.4; from 0.13.0 before 0.13.2; from 1.0.0 before 1.0.3

## Every score

- mitre: CVSS:3.1 3.2 Low `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N`
- GitHub: CVSS:3.1 3.2 Low `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N`
- GitHub: CVSS:4.0 Low `CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://hackerone.com/reports/2957667> (permissions-required, web)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/uri/CVE-2025-27221.yml> (third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00015.html> (web)
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00008.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-27221> (advisory)
- <https://github.com/ruby/uri/pull/154> (web)
- <https://github.com/ruby/uri/pull/155> (web)
- <https://github.com/ruby/uri/pull/156> (web)
- <https://github.com/ruby/uri/pull/157> (web)
- <https://github.com/ruby/uri> (package)
- <https://www.cve.org/CVERecord?id=CVE-2025-27221> (web)
- <https://www.ruby-lang.org/en/news/2025/02/26/security-advisories> (web)

## Sources

- CVE List: [CVE-2025-27221](https://www.cve.org/CVERecord?id=CVE-2025-27221), CVE Terms of Use, modified 2025-11-03
- GitHub Advisory Database: [GHSA-22h5-pq3x-2gf2](https://github.com/advisories/GHSA-22h5-pq3x-2gf2), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-27221](https://nvd.nist.gov/vuln/detail/CVE-2025-27221), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-27221 · Whole record: https://cve.day/CVE-2025-27221.json · Rebuilt by cve.day 2026-11-25T22:58:54.935Z
