Vulnerabilities · 2025 · Ruby-lang
CVE-2025-27221
Ruby-lang Uri vulnerability
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.
Affected products
Uri. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Ruby-lang Uri runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- github.com/ruby/uri/pull/154
- github.com/ruby/uri/pull/155
- github.com/ruby/uri/pull/156
- github.com/ruby/uri/pull/157
- github.com/rubysec/ruby-advisory-db/blob/master/gems/uri/CVE-2025-27221.yml
- www.cve.org/CVERecord?id=CVE-2025-27221
- www.ruby-lang.org/en/news/2025/02/26/security-advisories
- nvd.nist.gov/vuln/detail/CVE-2025-27221
- nvd.nist.gov/vuln/detail/CVE-2025-27221
- cve.org/CVERecord?id=CVE-2025-27221
More vulnerabilities in Ruby-lang products
CVE-2026-46727CVE-2025-58767CVE-2025-43857CVE-2025-27788CVE-2025-27220CVE-2025-27219CVE-2025-6442CVE-2024-49761All 115
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.