URI Credential Leakage Bypass over CVE-2025-27221
URI is a module providing classes to handle Uniform Resource Identifiers. In versions 0.12.4 and earlier (bundled in Ruby 3.2 series) 0.13.2 and earlier (bundled in Ruby 3.3 series), 1.0.3 and earlier (bundled in Ruby 3.4 series), when using the + operator to combine URIs, sensitive information like passwords from the original URI can be leaked, violating RFC3986 and making applications vulnerable to credential exposure. This is a a bypass for the fix to CVE-2025-27221 that can expose user credentials. This issue has been fixed in versions 0.12.5, 0.13.3 and 1.0.4.
- Published
- Dec 30, 2025
- Updated
- Jun 17, 2026
- EPSS
- 0.6% · 44th percentile
- CWE
- CWE-200
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
8
Monitor
Low priority for now.
- CVSS
- 8 / 40 · 2.1 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.6%
CISA SSVC decision
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · GitHub_M
- 2.1
- NVD has not scored this yet; the score shown is the CNA’s.
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| ruby-lang | uri | cpe:2.3:a:ruby-lang:uri |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- ruby-lang uribefore 0.12.5
- ruby-lang uri0.13.0 and later · before 0.13.3
- ruby-lang uri1.0.0 and later · before 1.0.4
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
ruby uri
- < 0.12.5, >= 0.13.0, < 0.13.3, >= 1.0.0, < 1.0.4affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.20 | ruby | before 3.3.10-r0 | 3.3.10-r0 |
| Alpine:v3.23 | ruby | before 3.4.7-r0 | 3.4.7-r0 |
| Debian:12 | ruby3.1 | all versions | — |
| Debian:12 | rubygems | all versions | — |
| Debian:13 | ruby3.3 | all versions | — |
| openSUSE:Leap 16.0 | ruby3.4 | before 3.4.10-160000.1.1 | 3.4.10-160000.1.1 |
| openSUSE:Tumbleweed | ruby3.4 | before 3.4.7-1.1 | 3.4.7-1.1 |
| openSUSE:Tumbleweed | rubygem-uri | before 1.1.1-1.1 | 1.1.1-1.1 |
| Red Hat:enterprise_linux:10.1 | ruby | before 0:3.3.10-11.el10_1 | 0:3.3.10-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | ruby-bundled-gems | before 0:3.3.10-11.el10_1 | 0:3.3.10-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | ruby-bundled-gems-debuginfo | before 0:3.3.10-11.el10_1 | 0:3.3.10-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | ruby-debuginfo | before 0:3.3.10-11.el10_1 | 0:3.3.10-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | ruby-debugsource | before 0:3.3.10-11.el10_1 | 0:3.3.10-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | ruby-default-gems | before 0:3.3.10-11.el10_1 | 0:3.3.10-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | ruby-devel | before 0:3.3.10-11.el10_1 | 0:3.3.10-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | ruby-doc | before 0:3.3.10-11.el10_1 | 0:3.3.10-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | ruby-libs | before 0:3.3.10-11.el10_1 | 0:3.3.10-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | ruby-libs-debuginfo | before 0:3.3.10-11.el10_1 | 0:3.3.10-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | rubygem-bigdecimal | before 0:3.1.5-11.el10_1 | 0:3.1.5-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | rubygem-bigdecimal-debuginfo | before 0:3.1.5-11.el10_1 | 0:3.1.5-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | rubygem-bundler | before 0:2.5.22-11.el10_1 | 0:2.5.22-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | rubygem-io-console | before 0:0.7.1-11.el10_1 | 0:0.7.1-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | rubygem-io-console-debuginfo | before 0:0.7.1-11.el10_1 | 0:0.7.1-11.el10_1 |
| Red Hat:enterprise_linux:10.1 | rubygem-irb | before 0:1.13.1-11.el10_1 | 0:1.13.1-11.el10_1 |
+96
Same product
ruby-lang: all recordsOther highest-scoring records for the same primary product.
- CVE-2023-36617A ReDoS issue was discovered in the URI component before 0.12.2 for Ruby.22Monitor
- CVE-2023-28755A ReDoS issue was discovered in the URI component through 0.12.0 in Ruby through 3.2.1.22Monitor
- CVE-2025-27221In the URI gem before 1.0.3 for Ruby, the URI handling methods (URI.join, URI#merge, URI#+) have an inadvertent leakage of authentication cr21Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:ruby | 3.3.10-r0 · Alpine:v3.20 | Package registry (OSV) |
| opensuse:ruby3.4 | 3.4.7-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:rubygem-uri | 1.1.1-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| red hat:ruby | 0:3.3.10-5.module+el8.10.0+23696+c42b0f57 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-bundled-gems | 0:3.3.10-5.module+el8.10.0+23696+c42b0f57 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-bundled-gems-debuginfo | 0:3.3.10-5.module+el8.10.0+23696+c42b0f57 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-debuginfo | 0:3.3.10-5.module+el8.10.0+23696+c42b0f57 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-debugsource | 0:3.3.10-5.module+el8.10.0+23696+c42b0f57 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-default-gems | 0:3.3.10-5.module+el8.10.0+23696+c42b0f57 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-devel | 0:3.3.10-5.module+el8.10.0+23696+c42b0f57 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-doc | 0:3.3.10-5.module+el8.10.0+23696+c42b0f57 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-libs | 0:3.3.10-5.module+el8.10.0+23696+c42b0f57 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-libs-debuginfo | 0:3.3.10-5.module+el8.10.0+23696+c42b0f57 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:rubygem-abrt | 0:0.4.0-1.module+el8.10.0+21226+b78a28c4 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:rubygem-abrt-doc | 0:0.4.0-1.module+el8.10.0+21226+b78a28c4 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| rocky linux:ruby | 0:3.3.10-5.module+el8.10.0+40038+e29e4152 · Rocky Linux:8 | Package registry (OSV) |
| rocky linux:rubygem-abrt | 0:0.4.0-1.module+el8.10.0+1827+16ecb9d2 · Rocky Linux:8 | Package registry (OSV) |
| rocky linux:rubygem-mysql2 | 0:0.5.5-1.module+el8.10.0+1679+61871737 · Rocky Linux:8 | Package registry (OSV) |
| rocky linux:rubygem-pg | 0:1.5.4-1.module+el8.10.0+1679+61871737 · Rocky Linux:8 | Package registry (OSV) |
| RubyGems:uri | 0.11.3 | Package registry (OSV) |
| RubyGems:uri | 0.12.4 | Package registry (OSV) |
| RubyGems:uri | 0.12.5 | Package registry (OSV) |
| RubyGems:uri | 0.13.2 | Package registry (OSV) |
| RubyGems:uri | 0.13.3 | Package registry (OSV) |
| RubyGems:uri | 1.0.3 | Package registry (OSV) |
| RubyGems:uri | 1.0.4 | Package registry (OSV) |
| suse:ruby3.4 | 3.4.10-150700.3.4.1 · SUSE:Linux Enterprise Module for Basesystem 15 SP7 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
The product’s vendor appears in a public program. Matched by name; verify the scope text in the program.
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- Integrity
- Availability
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- X
Weakness class (CWE)
CWE-200 · Exposure of Sensitive Information to an Unauthorized ActorCVSS vector
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
nvd-secondary
Root cause
The extension requests broader permissions than its function needs and sends the data it collects out for purposes beyond its stated function.
The bug in code
The whole CWE-200 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
{ "permissions": ["tabs", "<all_urls>"], "background": { "service_worker": "analytics.js" }}Fixed
{ "permissions": ["activeTab"], "host_permissions": ["https://yildiz.example/*"]}Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- ExcavationCAPEC-116likelihood: High · Medium
- Subverting Environment Variable ValuesCAPEC-13likelihood: High · Very High
- FootprintingCAPEC-169likelihood: High · Very Low
- Exploiting Trust in ClientCAPEC-22likelihood: High · High
- FingerprintingCAPEC-224likelihood: High · Very Low
- ICMP Echo Request PingCAPEC-285likelihood: Medium · Low
- TCP SYN ScanCAPEC-287Low
- Enumerate Mail Exchange (MX) RecordsCAPEC-290Low
ATT&CK techniques
- System Service DiscoveryT1007
- System Network Configuration DiscoveryT1016
- Remote System DiscoveryT1018
- System Owner/User DiscoveryT1033
- Masquerading: Match Legitimate Name or LocationT1036.005
- Network Service ScanningT1046
- System Network Connections DiscoveryT1049
- Process DiscoveryT1057
- Permission Groups DiscoveryT1069
- System Information DiscoveryT1082
- File and Directory DiscoveryT1083
- Account DiscoveryT1087
- Multi-Factor Authentication InterceptionT1111
- Peripheral Device DiscoveryT1120
- System Time DiscoveryT1124
- Access Token Manipulation:Token Impersonation/TheftT1134.001
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- github.com/advisories/GHSA-22h5-pq3x-2gf2
- github.com/ruby/uri/security/advisories/GHSA-j4pr-3wm6-xx2r
- hackerone.com/reports/2957667
- www.ruby-lang.org/en/news/2025/02/26/security-advisories
Vendor advisories and official records. Exploit/PoC links are deliberately left out.