Skip to content

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

MediumCVSS 5.3 EPSS 0.51% PoC
Published
Updated
Exploit status
Proof-of-concept only
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
UbuntuDebian

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.

Upgrade path

15 packages: 12 fixed, 3 with no fix yet.

PackageAffectedFixed inStatus
ubuntu/jruby(Ubuntu 24.04) All versions No fix listed No fix yet
ubuntu/jruby(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/jruby(Ubuntu 26.10) All versions No fix listed No fix yet
azure linux ruby(Azure Linux 3.0) < 3.3.5-3 3.3.5-3 Fixed
cbl-mariner ruby(CBL-Mariner 2.0) < 3.1.4-9 3.1.4-9 Fixed
debian/ruby3.1(Debian 12) < 3.1.7-1~deb12u2; = 3.1.2-7; = 3.1.2-7+deb12u1; = 3.1.2-7+hurd.1 +5 more 3.1.7-1~deb12u2 Fixed
debian/ruby3.3(Debian 13) < 3.3.7-2 3.3.7-2 Fixed
debian/ruby3.3(Debian 14) < 3.3.7-2 3.3.7-2 Fixed
debian/rubygems(Debian 12) < 3.3.15-2+deb12u1; = 3.3.15-2 3.3.15-2+deb12u1 Fixed
debian/rubygems(Debian 13) < 3.6.6-1 3.6.6-1 Fixed
debian/rubygems(Debian 14) < 3.6.6-1 3.6.6-1 Fixed
ruby-lang 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 Fixed
rubygems uri(RubyGems) < 0.11.3; = 0.10.0; = 0.10.0.1; = 0.10.0.2 +19 more 0.11.3, 0.12.4, 0.13.2, 1.0.3 Fixed
ubuntu/ruby3.0(Ubuntu 22.04) < 3.0.2-7ubuntu2.10 3.0.2-7ubuntu2.10 Fixed
ubuntu/ruby3.2(Ubuntu 24.04) < 3.2.3-1ubuntu0.24.04.5 3.2.3-1ubuntu0.24.04.5 Fixed

Affected products

ProductAffected versionsFixed in
cbl-mariner ruby(CBL-Mariner:2.0) < 3.1.4-9 3.1.4-9
azure linux ruby(Azure Linux:3.0) < 3.3.5-3 3.3.5-3
rubygems uri(RubyGems) < 0.11.3 0.11.3
rubygems uri(RubyGems) = 0.10.0 No fix listed
rubygems uri(RubyGems) = 0.10.0.1 No fix listed
rubygems uri(RubyGems) = 0.10.0.2 No fix listed
rubygems uri(RubyGems) = 0.10.0.3 No fix listed
rubygems uri(RubyGems) = 0.10.1 No fix listed
rubygems uri(RubyGems) = 0.10.2 No fix listed
rubygems uri(RubyGems) = 0.10.3 No fix listed
rubygems uri(RubyGems) = 0.11.0 No fix listed
rubygems uri(RubyGems) = 0.11.1 No fix listed
rubygems uri(RubyGems) = 0.11.2 No fix listed
rubygems uri(RubyGems) >= 0.12.0, < 0.12.4 0.12.4
rubygems uri(RubyGems) = 0.12.0 No fix listed
rubygems uri(RubyGems) = 0.12.1 No fix listed
rubygems uri(RubyGems) = 0.12.2 No fix listed
rubygems uri(RubyGems) = 0.12.3 No fix listed
rubygems uri(RubyGems) >= 0.13.0, < 0.13.2 0.13.2
rubygems uri(RubyGems) = 0.13.0 No fix listed
rubygems uri(RubyGems) = 0.13.1 No fix listed
rubygems uri(RubyGems) >= 1.0.0, < 1.0.3 1.0.3
rubygems uri(RubyGems) = 1.0.0 No fix listed
rubygems uri(RubyGems) = 1.0.1 No fix listed
rubygems uri(RubyGems) = 1.0.2 No fix listed
Show 24 more
ProductAffected versionsFixed in
ruby-lang URI < 0.11.3 0.11.3
ruby-lang URI >= 0.12.0, < 0.12.4 0.12.4
ruby-lang URI >= 0.13.0, < 0.13.2 0.13.2
ruby-lang URI >= 1.0.0, < 1.0.3 1.0.3
ubuntu/ruby3.0(Ubuntu:22.04) < 3.0.2-7ubuntu2.10 3.0.2-7ubuntu2.10
ubuntu/jruby(Ubuntu:24.04) All versions No fix listed
ubuntu/ruby3.2(Ubuntu:24.04) < 3.2.3-1ubuntu0.24.04.5 3.2.3-1ubuntu0.24.04.5
ubuntu/jruby(Ubuntu:26.04) All versions No fix listed
ubuntu/jruby(Ubuntu:26.10) All versions No fix listed
debian/ruby3.1(Debian:12) < 3.1.7-1~deb12u2 3.1.7-1~deb12u2
debian/ruby3.1(Debian:12) = 3.1.2-7 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-7+deb12u1 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-7+hurd.1 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-8 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-8.1~exp1 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-8.3 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-8.4 No fix listed
debian/ruby3.1(Debian:12) = 3.1.2-8.5 No fix listed
debian/ruby3.3(Debian:13) < 3.3.7-2 3.3.7-2
debian/ruby3.3(Debian:14) < 3.3.7-2 3.3.7-2
debian/rubygems(Debian:12) < 3.3.15-2+deb12u1 3.3.15-2+deb12u1
debian/rubygems(Debian:12) = 3.3.15-2 No fix listed
debian/rubygems(Debian:13) < 3.6.6-1 3.6.6-1
debian/rubygems(Debian:14) < 3.6.6-1 3.6.6-1

References