CVE-2025-27221Published Mar 3, 2025 · Mar 3Updated Oct 28
URI allows for userinfo Leakage in URI#join, URI#merge, and URI#+
ruby-lang URI
Low3.2Fix available
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| uri RubyGems |
|
|
ruby-lang URI
| Product | Affected | Fixed in |
|---|---|---|
| uri RubyGems |
|
|
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.
From the CVE record · mitre
The Ruby URI gem’s URI.join, URI#merge, and URI#+ methods can retain authentication credentials in userinfo after changing the host, potentially leaking those credentials. The input does not specify attacker access requirements or whether user interaction is needed.
Check Ruby applications using the URI gem in versions below 0.11.3, from 0.12.0 to below 0.12.4, from 0.13.0 to below 0.13.2, or from 1.0.0 to below 1.0.3.