CVE-2025-27221
URI allows for userinfo Leakage in URI#join, URI#merge, and URI#+
Reported by mitre · Published March 3, 2025
uri is fixed in 1.0.3, 0.13.2, 0.12.4 and 1 more (RubyGems)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| uri | RubyGems | 1.0.3, 0.13.2, 0.12.4, 0.11.3 |
| ruby3.2-rubygems-devel | Amazon Linux | 3.4.19-183.amzn2023.0.2 |
| ruby3.2-faraday-1.10.3 | Chainguard | 1.10.3-r9 |
| ruby3.2-rubygem-io-console | Amazon Linux | 0.6.0-183.amzn2023.0.2 |
| ruby3.4-uri | Chainguard | 1.0.3-r0 |
| ruby3.2-rubygem-rake | Amazon Linux | 13.0.6-183.amzn2023.0.2 |
| ruby3.2-rubygem-rss | Amazon Linux | 0.3.1-183.amzn2023.0.2 |
| ruby3.4-uri | Wolfi | 1.0.3-r0 |
| ruby3.2-rubygem-irb | Amazon Linux | 1.6.2-183.amzn2023.0.2 |
| ruby3.2-rubygem-typeprof | Amazon Linux | 0.21.3-183.amzn2023.0.2 |
| ruby3.2-doc | Amazon Linux | 3.2.7-183.amzn2023.0.2 |
| ruby3.3-rails-8.0 | Chainguard | 8.0.2-r1 |
27 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| ruby-lang | URI | 0, 0.12.0, 0.13.0 |
| amazon:2023 | ruby3.2-rubygems-devel | 0 |
| chainguard | ruby3.2-faraday-1.10.3 | 0 |
| amazon:2023 | ruby3.2-rubygem-io-console | 0 |
| chainguard | ruby3.4-uri | 0 |
| amazon:2023 | ruby3.2-rubygem-rake | 0 |
| amazon:2023 | ruby3.2-rubygem-rss | 0 |
| wolfi | ruby3.4-uri | 0 |
| amazon:2023 | ruby3.2-rubygem-irb | 0 |
| amazon:2023 | ruby3.2-rubygem-typeprof | 0 |
| amazon:2023 | ruby3.2-doc | 0 |
| chainguard | ruby3.3-rails-8.0 | 0 |
| amazon:2023 | ruby3.2-bundled-gems | 0 |
| amazon:2023 | ruby3.2-rubygem-bundler | 0 |
| wolfi | ruby3.2-uri | 0 |
| wolfi | ruby-3.4 | 0 |
| amazon:2023 | ruby3.2-rubygem-minitest | 0 |
| amazon:2023 | ruby3.2-rubygem-bigdecimal | 0 |
| chainguard | ruby-3.1 | 0 |
| amazon:2023 | ruby3.2-devel | 0 |
…and 35 more
Timeline
- Feb 20, 2025 CVE ID Reserved
- Feb 25, 2025 CVE Published
- Mar 4, 2025 EPSS Score (30 in total, the first dated here)
- Nov 3, 2025 CVE Updated
- Mar 17, 2026 Security Advisory (9 in total, the first dated here)
- Jun 15, 2026 Coalition ESS Score
- Oct 21, 2026 Distribution Patch (8 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-27221
vulnetix vdb fixes CVE-2025-27221
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-27221/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-27221 advisory
- https://github.com/advisories/GHSA-22h5-pq3x-2gf2 advisory
- https://github.com/ruby/uri/pull/154 patch
- https://github.com/ruby/uri/pull/155 patch
- https://github.com/ruby/uri/pull/156 patch
- https://github.com/ruby/uri/pull/157 patch
- https://github.com/ruby/uri url
- https://www.cve.org/CVERecord?id=CVE-2025-27221 url
- https://www.ruby-lang.org/en/news/2025/02/26/security-advisories url
- https://lists.debian.org/debian-lts-announce/2025/05/msg00015.html url
- https://lists.debian.org/debian-lts-announce/2025/03/msg00008.html url