Skip to main content

Ruby URI gem CVE-2025-61594

LOW
Information Exposure (CWE-200)
2025-12-30 security-advisories@github.com
2.1
CVSS 4.0 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker supplies or influences a relative URI path
  2. Delivery
    Application calls URI+ on a credential-bearing base URI
  3. Exploit
    URI+ retains userinfo across host change
  4. Execution
    Combined URI targets attacker-controlled host
  5. Persist
    Application issues HTTP request
  6. Impact
    Credentials transmitted to attacker server

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK

2 techniques across 2 tactics: Collection, Discovery

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concurrent conditions: (1) the application must construct or receive a URI containing embedded userinfo credentials in the user:password@host format; (2) application code must invoke the URI#+ operator using that credential-bearing URI as the left-hand operand; and (3) the right-hand operand (the URI being combined) must resolve to a different host than the base - either through attacker-supplied input or a redirect. Exploitation is limited to the Ruby 3.2, 3.3, and 3.4 release series on URI gem versions below the fix thresholds. Applications that never embed credentials in URI objects, or that use string interpolation or manual URI construction rather than the + operator, are not affected. The CVSS 4.0 AT:P (attack requirements present) and AV:L confirm that specific application behavior is a prerequisite, not a default-configuration exposure.

Impact

Multiple signals converge on a low real-world risk rating. The CVSS 4.0 base score is 2.1 (AV:L/AT:P/SC:L), reflecting that attack preconditions are specific (AT:P) and consequential system impact is limited (SC:L). EPSS is 0.01% at the 3rd percentile, indicating extremely low observed exploitation probability compared to all CVEs. The vulnerability is not listed in the CISA KEV catalog, and no public exploit code has been identified. However, the risk is non-trivial for applications that: (1) construct URIs with embedded credentials, and (2) use the + operator to resolve paths against those URIs in contexts where the host can be influenced by external input. In such scenarios, credentials could silently be forwarded to an attacker-controlled server - a pattern common in HTTP client libraries, redirect-following code, or webhook processors. The bypass nature of this CVE (circumventing the CVE-2025-27221 fix) suggests that security-conscious teams who already patched the prior issue may have reintroduced exposure through this vector. Low EPSS and absent KEV status do not reduce the need for patching; they simply indicate the issue has not been broadly weaponized to date.

Exploit ScenarioDerived

An HTTP client library or redirect-handling component in a Ruby application stores an authenticated base URI (e.g., https://user:secret@api.internal/v1/) and uses the + operator to resolve a relative path returned in a server response or user-supplied input (e.g., //attacker.example/harvest). The resulting URI retains the original userinfo, producing https://user:secret@attacker.example/harvest, which the application then requests - sending credentials to the attacker's server in the Authorization header or URI. No public proof-of-concept exists for this specific bypass, but the attack pattern is mechanically identical to that documented for CVE-2025-27221.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 24, 2026

Credential leakage in the Ruby URI gem's + operator allows sensitive userinfo (username and password embedded in URIs) to persist when the host portion of a URI is replaced, violating RFC3986. This flaw affects URI gem versions bundled across the Ruby 3.2, 3.3, and 3.4 release series and represents a bypass of the prior fix for CVE-2025-27221, which patched equivalent behavior in URI#join and URI#merge but left URI#+ unaddressed. No public exploit code has been identified and EPSS is 0.01%, but applications that embed credentials in URIs and dynamically combine them using + are concretely at risk of sending those credentials to attacker-controlled hosts.

RemediationAI

Upgrade the uri gem to the patched versions: 0.12.5 for Ruby 3.2 series, 0.13.3 for Ruby 3.3 series, or 1.0.4 for Ruby 3.4 series. Run gem update uri or update the gem constraint in your Gemfile to gem 'uri', '>= 0.12.5' (adjusting for your Ruby series), then run bundle update uri. Upstream fix pull requests are available at https://github.com/ruby/uri/pull/154 and https://github.com/ruby/uri/pull/155. As a compensating control where immediate patching is not feasible, audit application code for any use of the URI#+ operator on URIs that contain embedded userinfo and refactor to strip credentials before performing URI combination - for example, by zeroing uri.userinfo = nil on the base URI prior to calling +. This eliminates the leakage path without requiring a gem upgrade. Note that stripping userinfo before combination may break authentication flows that depend on credential propagation, so verify application behavior after applying the control.

Affected Packages

rubygems uri fix: 0.12.5, 0.13.3, 1.0.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in rubygems

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The Ruby standard library ships a bundled uri gem (cpe:2.3:a:ruby-lang:uri:*:*:*:*:*:ruby:*:*) for parsing and manipulating RFC3986 URIs. The + operator is intended to resolve a relative reference against a base URI, analogous to how browsers resolve relative links. The root cause (CWE-200, Exposure of Sensitive Information) is that the implementation fails to strip the userinfo component (the user:password@ segment) from the base URI when the resulting combined URI targets a different host. CVE-2025-27221 previously patched URI#join and URI#merge for the same class of defect, but the + operator, which shares similar resolution logic, was not patched in the same fix cycle, creating this bypass. The three affected release branches correspond to gem versions ≤0.12.4 (Ruby 3.2 series), ≤0.13.2 (Ruby 3.3 series), and ≤1.0.3 (Ruby 3.4 series).

Know when Uri gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 2.1 LOW
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
vuln.today AI 3.4 LOW

Network vector because credentials are exfiltrated to a remote host; AC:H and UI:R reflect AT:P preconditions requiring specific application URI-combination behavior; S:C because credential impact falls on a subsequent system.

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionGitHub Advisory

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.

Threat Intelligence Overview

EPSS Score
0.0%
Top 97% exploitable
Prevalence
High
bundled with all Ruby releases, extremely broad ecosystem deployment
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
High

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)GitHub Advisory

cpe:2.3:a:ruby-lang:uri:*:*:*:*:*:ruby:*:*
cpe:2.3:a:ruby-lang:uri:*:*:*:*:*:ruby:*:*
cpe:2.3:a:ruby-lang:uri:*:*:*:*:*:ruby:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy