CVE-2025-27221
MEDIUM 5.3CVSS 3.1URI allows for userinfo Leakage in URI#join, URI#merge, and URI#+
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.
- Published
- 4 Mar 2025
- Last modified
- 10 Sep 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-200CWE-212
- Also known as
- GHSA-22h5-pq3x-2gf2
- Sources
- NVDJSONOSV GHSA-22h5-pq3x-2gf2JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | 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 | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | cve@mitre.org (Secondary) | CVSS 3.1 | LOW 3.2 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | LOW 3.2 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | ruby-lang | uricpe:2.3:a:ruby-lang:uri:*:*:*:*:*:ruby:*:* |
< 0.11.3 | 0.11.3 |
| NVD | ruby-lang | uricpe:2.3:a:ruby-lang:uri:*:*:*:*:*:ruby:*:* |
>= 0.12.0, < 0.12.4 | 0.12.4 |
| NVD | ruby-lang | uricpe:2.3:a:ruby-lang:uri:*:*:*:*:*:ruby:*:* |
>= 0.13.0, < 0.13.2 | 0.13.2 |
| NVD | ruby-lang | uricpe:2.3:a:ruby-lang:uri:*:*:*:*:*:ruby:*:* |
>= 1.0.0, < 1.0.3 | 1.0.3 |
| OSV | RubyGems | uri | < 0.11.3 | 0.11.3 |
| OSV | RubyGems | uri | >= 0.12.0, < 0.12.4 | 0.12.4 |
| OSV | RubyGems | uri | >= 0.13.0, < 0.13.2 | 0.13.2 |
| OSV | RubyGems | uri | >= 1.0.0, < 1.0.3 | 1.0.3 |
References
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/uri/CVE-2025-27221.yml · Third Party Advisory, WEB
- https://hackerone.com/reports/2957667 · Permissions Required, WEB
- https://lists.debian.org/debian-lts-announce/2025/03/msg00008.html · WEB
- https://lists.debian.org/debian-lts-announce/2025/05/msg00015.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
History
- 25 Nov 2026 20:57 UTC · NVD: first stored (published 4 Mar 2025)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 3 Mar 2025)