CVE-2025-61594

7.5 HIGH

📋 TL;DR

This vulnerability in Ruby's URI module allows credential exposure when using the '+' operator to combine URIs. Sensitive information like passwords from the original URI can be leaked, violating RFC3986 standards. Applications using vulnerable versions of the URI gem for URI manipulation are affected.

💻 Affected Systems

Products:
  • Ruby URI gem
Versions: URI gem versions <0.12.5, 0.13.0-0.13.2, 1.0.0-1.0.3
Operating Systems: All operating systems running Ruby
Default Config Vulnerable: ⚠️ Yes
Notes: Affects any Ruby application using the URI module's '+' operator with URIs containing credentials.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

User credentials (passwords) from URIs are exposed to unauthorized parties, potentially leading to account compromise and data breaches.

🟠

Likely Case

Accidental credential leakage during URI manipulation operations, exposing authentication information in logs, error messages, or to downstream systems.

🟢

If Mitigated

Limited exposure if applications don't use the '+' operator with URIs containing credentials or if credential URIs are sanitized before processing.

🌐 Internet-Facing: MEDIUM - Applications processing user-provided URIs or combining URIs from external sources could expose credentials.
🏢 Internal Only: LOW - Primarily affects applications performing URI manipulation operations internally.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires the application to use the vulnerable '+' operator with URIs containing credentials. No authentication needed if the application processes external URIs.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.12.5, 0.13.3, or 1.0.4

Vendor Advisory: https://www.ruby-lang.org/en/news/2025/10/07/uri-cve-2025-61594/

Restart Required: No

Instructions:

1. Update the URI gem to version 0.12.5, 0.13.3, or 1.0.4 depending on your current version. 2. Run 'bundle update uri' if using Bundler. 3. Verify the update with 'gem list uri'.

🔧 Temporary Workarounds

Avoid URI '+' operator with credentials

all

Manually sanitize URIs before using the '+' operator or avoid using the operator with URIs containing credentials.

🧯 If You Can't Patch

  • Audit code for usage of URI '+' operator with URIs containing credentials and implement manual sanitization
  • Implement input validation to reject or sanitize URIs containing credentials before processing

🔍 How to Verify

Check if Vulnerable:

Check your Gemfile.lock or run 'gem list uri' to see the installed version. If version is <0.12.5, 0.13.0-0.13.2, or 1.0.0-1.0.3, you are vulnerable.

Check Version:

gem list uri | grep uri

Verify Fix Applied:

After updating, run 'gem list uri' to confirm version is 0.12.5, 0.13.3, or 1.0.4. Test URI combination operations that previously contained credentials.

📡 Detection & Monitoring

Log Indicators:

  • Log entries showing URI manipulation with credential-containing URIs
  • Unexpected credential exposure in application logs

Network Indicators:

  • Credential leakage in HTTP requests or responses when URIs are processed

SIEM Query:

Search for patterns of URI manipulation operations in application logs, particularly those involving the '+' operator with authentication data.

🔗 References

📤 Share & Export