CVE-2025-27221: Infoleak

Published Mar 3, 2025
·
Updated

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.

Other sources

There is a possibility for userinfo leakage by in the uri gem. This vulnerability has been assigned the CVE identifier CVE-2025-27221. We recommend upgrading the uri gem.

Details

The methods URI#join, URI#merge, and URI#+ retained userinfo, such as user:password, even after the host is replaced. When generating a URL to a malicious host from a URL containing secret userinfo using these methods, and having someone access that URL, an unintended userinfo leak could occur.

Please update URI gem to version 0.11.3, 0.12.4, 0.13.2, 1.0.3 or later.

Affected versions

uri gem versions < 0.11.3, 0.12.0 to 0.12.3, 0.13.0, 0.13.1 and 1.0.0 to 1.0.2.

Credits

Thanks to Tsubasa Irisawa (lambdasawa) for discovering this issue. Also thanks to nobu for additional fixes of this vulnerability.

GitHub

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

12 affected componentsFixes available
rubygems/uri>=1.0.0<1.0.3
1.0.3
rubygems/uri>=0.13.0<0.13.2
0.13.2
rubygems/uri>=0.12.0<0.12.4
0.12.4
rubygems/uri<0.11.3
0.11.3
debian/ruby2.7<=2.7.4-1+deb11u1
2.7.4-1+deb11u5
debian/ruby3.1<=3.1.2-7+deb12u1
debian/ruby3.3
3.3.8-13.3.8-2
debian/rubygems<=3.2.5-2, <=3.3.15-2
3.6.7-2
ruby-lang Uri Ruby<0.11.3
ruby-lang Uri Ruby>=0.12.0<0.12.4
ruby-lang Uri Ruby>=0.13.0<0.13.2
ruby-lang Uri Ruby>=1.0.0<1.0.3

Event History

Mar 3, 2025
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Advisory Published
via GitHub·10:07 PM
Data Sourced
via GitHub·10:07 PM
DescriptionSeverityWeaknessAffected Software
Mar 4, 2025
Data Sourced
via Red Hat·12:01 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·12:15 AM
DescriptionSeverityWeaknessAffected Software
Apr 7, 2025
Data Sourced
via Launchpad·03:37 PM
Description
Apr 19, 2025
Data Sourced
via Ubuntu·03:39 PM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-27221?

CVE-2025-27221 poses a risk of userinfo leakage, which can lead to unauthorized access to sensitive information.

2

How do I fix CVE-2025-27221?

To remediate CVE-2025-27221, upgrade the uri gem to version 1.0.3, 0.13.2, 0.12.4, or 0.11.3 as applicable.

3

What is the impact of CVE-2025-27221 on my application?

CVE-2025-27221 can lead to leaking sensitive user credentials, compromising user privacy and security.

4

Which versions of the uri gem are affected by CVE-2025-27221?

CVE-2025-27221 affects versions of the uri gem prior to 1.0.3, 0.13.2, 0.12.4, and 0.11.3.

5

Is there a workaround for CVE-2025-27221 if I cannot upgrade?

No specific workarounds are recommended for CVE-2025-27221; upgrading to the fixed versions is the only effective solution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203