CVE-2025-27221 json
URI allows for userinfo Leakage in URI#join, URI#merge, and URI#+
published 2025-03-03 20 mo ago modified 2026-09-10 1 mo ago also EUVD-2025-5508 , GHSA-22h5-pq3x-2gf2
- cvss
- 3.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 43%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems uri 0.11.3, 0.12.4, 0.13.2, 1.0.3
- ruby-lang URI 0.11.3, 0.12.4, 0.13.2, 1.0.3
- ruby3.3 Debian 14, Debian 13 3.3.7-2
- rubygems Debian 12 3.3.15-2+deb12u1
- rubygems Debian 14, Debian 13 3.6.6-1
debian advisories DEBIAN-CVE-2025-27221
- ruby2.7 Ubuntu 20.04 LTS 2.7.0-5ubuntu1.18
- ruby3.0 Ubuntu 22.04 LTS 3.0.2-7ubuntu2.10
- ruby3.2 Ubuntu 24.04 LTS 3.2.3-1ubuntu0.24.04.5
- ruby3.3 Ubuntu 25.10 3.3.7-1ubuntu2
- ruby2.3 Ubuntu Pro 16.04 LTS 2.3.1-2~ubuntu16.04.16+esm10
- ruby2.5 Ubuntu Pro 18.04 LTS 2.5.1-1ubuntu1.16+esm4
ubuntu advisories UBUNTU-CVE-2025-27221
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- ruby RHEL 8 3.3.8-4.module+el8.10.0+23024+a87ba659
- rubygems RHEL 8 3.5.22-4.module+el8.10.0+23024+a87ba659
- ruby-libs RHEL 8 3.3.8-4.module+el8.10.0+23024+a87ba659
- rubygem-pg RHEL 8 1.5.4-1.module+el8.10.0+21226+b78a28c4
- rubygem-irb RHEL 8 1.13.1-4.module+el8.10.0+23024+a87ba659
- rubygem-rbs RHEL 8 3.4.0-4.module+el8.10.0+23024+a87ba659
- rubygem-rss RHEL 8 0.3.1-4.module+el8.10.0+23024+a87ba659
- rubygem-abrt RHEL 8 0.4.0-1.module+el8.10.0+21226+b78a28c4
red hat advisories RHSA-2025:10217RHSA-2025:8131RHSA-2025:4493RHSA-2025:4488RHSA-2025:4063
- ruby2.5 SLE Module for Basesystem 15 SP7 2.5.9-150700.24.3.1
- ruby2.5 SLE Module for Basesystem 15 SP6, SLE High Performance Computing 15 SP5-ESPOS, SLE High Performance Computing 15 SP4-ESPOS +13 more 2.5.9-150000.4.46.1
suse advisories SUSE-SU-2025:4264-1SUSE-SU-2025:02739-2SUSE-SU-2025:02739-1
- ruby AlmaLinux 8 3.3.8-4.module_el8.10.0+4022+8b66723c
- rubygems AlmaLinux 8 3.5.22-4.module_el8.10.0+4022+8b66723c
- ruby-libs AlmaLinux 8 3.3.8-4.module_el8.10.0+4022+8b66723c
- rubygem-pg AlmaLinux 8 1.5.4-1.module_el8.10.0+3799+191214cc
- rubygem-irb AlmaLinux 8 1.13.1-4.module_el8.10.0+4022+8b66723c
- rubygem-rbs AlmaLinux 8 3.4.0-4.module_el8.10.0+4022+8b66723c
- rubygem-rss AlmaLinux 8 0.3.1-4.module_el8.10.0+4022+8b66723c
- rubygem-abrt AlmaLinux 8 0.4.0-1.module_el8.10.0+3799+191214cc
almalinux advisories ALSA-2025:10217ALSA-2025:8131ALSA-2025:4488ALSA-2025:4063
- ruby Rocky Linux 10 3.3.8-10.el10_0
- ruby Rocky Linux 9 3.1.7-146.module+el9.5.0+31847+8b291b93
- rubygem-pg Rocky Linux 9 1.3.5-1.module+el9.5.0+31847+8b291b93
- rubygem-mysql2 Rocky Linux 9 0.5.4-1.module+el9.5.0+31847+8b291b93
- ruby Rocky Linux 9 3.3.8-4.module+el9.6.0+31867+3a5bf654
- rubygem-pg Rocky Linux 9 1.5.4-1.module+el9.6.0+31867+3a5bf654
- rubygem-mysql2 Rocky Linux 9 0.5.5-1.module+el9.6.0+31867+3a5bf654
- ruby Rocky Linux 8 3.3.8-4.module+el8.10.0+2004+fd6e8d72
rocky linux advisories RLSA-2025:8131RLSA-2025:4488RLSA-2025:4493RLSA-2025:10217RLSA-2025:4063
- ruby CBL-Mariner 2.0 3.1.4-9
- ruby Azure Linux 3.0 3.3.5-3
azure linux advisories AZL-57778AZL-57893
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- github.com/ruby/uri#154 pull request
- github.com/ruby/uri#155 pull request
- github.com/ruby/uri#156 pull request
- github.com/ruby/uri#157 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-27221 updated cvss 3.2
uri: userinfo leakage in URI#join, URI#merge and URI#+
-
Red Hat Enterprise Linux 9 ubi9/ruby-30, ubi9/ruby-31, ubi9/ruby-33affected: no fix available “Fix deferred”
-
Red Hat Enterprise Linux AppStream (v. 8) ruby 3.3.8-4.module+el8.10.0+23024+a87ba659, ruby 3.1.7-145.module+el8.10.0+23011+f9d508f8, ruby-libs 3.3.8-4.module+el8.10.0+23024+a87ba659, rubygems 3.5.22-4.module+el8.10.0+23024+a87ba659, rubygem-pg 1.3.2-1.module+el8.10.0+21470+43ec8058, rubygem-pg 1.5.4-1.module+el8.10.0+21226+b78a28c4, +41 morefixed: vendor fix RHSA-2025:4063
-
Red Hat Enterprise Linux AppStream (v. 9) ruby 3.3.8-4.module+el9.5.0+23030+26c9b8e1, ruby 3.1.7-146.module+el9.5.0+23003+a4c328ce, ruby-libs 3.3.8-4.module+el9.5.0+23030+26c9b8e1, rubygems 3.5.22-4.module+el9.5.0+23030+26c9b8e1, rubygem-pg 1.3.5-1.module+el9.1.0+15737+76195479, rubygem-pg 1.5.4-1.module+el9.4.0+21222+faeeed2f, +39 morefixed: vendor fix RHSA-2025:4488
-
Red Hat Enterprise Linux AppStream (v. 10) ruby 3.3.8-10.el10_0, ruby-libs 3.3.8-10.el10_0, rubygems 3.5.22-10.el10_0, rubygem-rbs 3.4.0-10.el10_0, rubygem-rss 0.3.1-10.el10_0, rubygem-irb 1.13.1-10.el10_0, +15 more Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) ruby-doc 3.3.8-10.el10_0fixed: vendor fix RHSA-2025:8131
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 20 mo ago
Exploit prediction
0.51% chance of exploitation in the next 30 days, higher than 43% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 3.2 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N |
| GitHub | 3.1 | 3.2 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N |
| NVD | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | uri | <0.11.3 >=0.12.0, <0.12.4 >=0.13.0, <0.13.2 >=1.0.0, <1.0.3 |
0.11.3 0.12.4 0.13.2 1.0.3 |
Affected products
- ruby-lang URI
Classification
References
-
github.com
/ruby/uri/pull/154
web
-
github.com
/ruby/uri/pull/155
web
-
github.com
/ruby/uri/pull/156
web
-
github.com
/ruby/uri/pull/157
web
-
hackerone.com
/reports/2957667
web, permissions-required
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/uri/CVE-2025-27221.yml
web, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2025/05/msg00015.html
web
-
lists.debian.org
/debian-lts-announce/2025/03/msg00008.html
web
-
nvd.nist.gov
/vuln/detail/CVE-2025-27221
advisory
-
github.com
/ruby/uri
package
-
cve.org
/CVERecord?id=CVE-2025-27221
web
-
ruby-lang.org
/en/news/2025/02/26/security-advisories
web
Sources
- CVE List CVE-2025-27221
- GitHub Advisory GHSA-22h5-pq3x-2gf2
- NVD CVE-2025-27221
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.