CVE-2025-61594

The Clingy Credential: Ruby URI Bypass (CVE-2025-61594)

Amit Schendel
Amit Schendel
Senior Security Researcher

Jan 1, 2026·5 min read·1 visit

Executive Summary (TL;DR)

Ruby's `uri` gem failed to scrub credentials (username/password) when merging URIs or changing hosts. If your code modifies a URL containing secrets (e.g., `http://admin:pass@internal`), it might accidentally carry those secrets over to the new destination (e.g., `http://admin:pass@public`), leaking credentials to external servers.

A deep dive into a credential leakage vulnerability in Ruby's standard `uri` gem, where updating a URI's host or port fails to clear sensitive user information, effectively bypassing the fix for CVE-2025-27221.

Fix Analysis (2)

Technical Appendix

CVSS Score
2.7/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:U
EPSS Probability
0.04%
Top 90% most exploited

Affected Systems

Ruby applications using the `uri` gemWeb crawlers/scrapers written in RubyAPI clients constructing URLs dynamicallyProxy services implemented in Ruby

Affected Versions Detail

Product
Affected Versions
Fixed Version
uri
Ruby
< 0.12.50.12.5
uri
Ruby
0.13.0 - 0.13.20.13.3
uri
Ruby
1.0.0 - 1.0.31.0.4
AttributeDetail
CWE IDCWE-212
Attack VectorNetwork
CVSS Score2.7 (Low)
CVSS VectorCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:U
ImpactCredential Leakage
EPSS Score0.00045
CWE-212
Improper Removal of Sensitive Information Before Storage or Transfer

The product stores, transfers, or otherwise manages sensitive information but does not clear or overwrite that information when it is no longer needed or when the context changes.

Vulnerability Timeline

CVE Published
2025-02-14
Patched versions released
2025-02-14