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

Low 3.2 Published Updated

Attackers can leak authentication credentials when URI methods retain userinfo after host changes, affecting Ruby applications using the URI gem.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-27221?

CVE-2025-27221 is a low-severity vulnerability in ruby-lang URI, published on 3 Mar 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-212

Which versions are affected by CVE-2025-27221?

8 open source packages ship an affected version, including uri. It affects 1 product.

PackageAffectedFixed in
uri RubyGemsAll versions0.11.3
uri RubyGemsAll versions0.11.3
uri RubyGemsFrom 0.12.00.12.4
uri RubyGemsFrom 0.12.00.12.4
uri RubyGemsFrom 0.13.00.13.2
uri RubyGemsFrom 0.13.00.13.2
2 more packages
uri RubyGemsFrom 1.0.01.0.3
uri RubyGemsFrom 1.0.01.0.3

Products include Ruby-Lang Uri.

How do I fix CVE-2025-27221?

Upgrade uri to a fixed version for your release line: 0.11.3, 0.12.4, 0.13.2 or 1.0.3.

Is CVE-2025-27221 being exploited?

There is no known exploitation of CVE-2025-27221 in the wild and no public exploit code.

Sources

Also known as AZL-57778, AZL-57893, CLEANSTART-2026-JV54364, CLEANSTART-2026-RX39488, CLSA-2026-1768314331, DEBIAN-CVE-2025-27221 and 17 more.

Is CVE-2025-27221 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free