CVE-2025-27221Ruby-lang Uri
Medium 5.3 No auth needed
Follow: this CVE · Ruby-lang · Ruby-lang Uri We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 3.1
- 5.3
- EPSS
- —
- Auth required
- No
- Published
- Mar 4, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-212
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for Uri.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| RubyGems | uri |
< 0.11.3 |
0.11.3 |
gem "uri", ">= 0.11.3" |
| RubyGems | uri |
≥ 0.12.0 < 0.12.4 |
0.12.4 |
gem "uri", ">= 0.12.4" |
| RubyGems | uri |
≥ 0.13.0 < 0.13.2 |
0.13.2 |
gem "uri", ">= 0.13.2" |
| RubyGems | uri |
≥ 1.0.0 < 1.0.3 |
1.0.3 |
gem "uri", ">= 1.0.3" |
Per OSV / GitHub Advisories (GHSA-22h5-pq3x-2gf2). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| ruby-lang | uri | < 0.11.3 |
| ruby-lang | uri | ≥ 0.12.0 < 0.12.4 |
| ruby-lang | uri | ≥ 0.13.0 < 0.13.2 |
| ruby-lang | uri | ≥ 1.0.0 < 1.0.3 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Third Party Advisory
- hackerone.com Permissions Required
- lists.debian.org
- lists.debian.org