CVE-2026-25765

5.8 MEDIUM

📋 TL;DR

CVE-2026-25765 is a Server-Side Request Forgery (SSRF) vulnerability in Faraday HTTP client library versions before 2.14.1. Attackers can exploit protocol-relative URLs (e.g., //evil.com/path) in user-supplied input to redirect HTTP requests to arbitrary hosts. Any application using vulnerable Faraday methods with untrusted input is affected.

💻 Affected Systems

Products:
  • Faraday HTTP client library
Versions: All versions before 2.14.1
Operating Systems: All operating systems running Ruby
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications that pass user-controlled input to Faraday's request methods (get(), post(), build_url(), etc.).

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of internal services via SSRF, data exfiltration, internal network reconnaissance, or chaining with other vulnerabilities to achieve remote code execution.

🟠

Likely Case

Unauthorized access to internal HTTP services, data leakage from internal APIs, or exploitation of trust relationships between services.

🟢

If Mitigated

Limited impact if input validation filters protocol-relative URLs or Faraday is only used with trusted data sources.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires user input to reach vulnerable Faraday methods. The vulnerability is straightforward to exploit once the attack vector is identified.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.14.1

Vendor Advisory: https://github.com/lostisland/faraday/security/advisories/GHSA-33mh-2634-fwr2

Restart Required: No

Instructions:

1. Update your Gemfile to specify 'faraday', '>= 2.14.1'. 2. Run 'bundle update faraday'. 3. Test your application to ensure compatibility with the updated version.

🔧 Temporary Workarounds

Input validation for protocol-relative URLs

all

Validate and reject user input containing protocol-relative URLs (starting with //) before passing to Faraday methods.

# Ruby code example: validate_path = user_input.start_with?('//') ? nil : user_input

🧯 If You Can't Patch

  • Implement strict input validation to block protocol-relative URLs (//) in all user-supplied paths.
  • Use Faraday only with trusted, hardcoded URLs and avoid passing user input directly to request methods.

🔍 How to Verify

Check if Vulnerable:

Check your Gemfile.lock or run 'bundle show faraday' to see the installed Faraday version. If version is < 2.14.1, you are vulnerable.

Check Version:

bundle show faraday

Verify Fix Applied:

After updating, verify the Faraday version is >= 2.14.1 using 'bundle show faraday' or checking Gemfile.lock.

📡 Detection & Monitoring

Log Indicators:

  • Unusual outbound HTTP requests to unexpected domains, especially with protocol-relative URLs in request paths.

Network Indicators:

  • HTTP requests from your application servers to external or unexpected internal hosts that don't match normal traffic patterns.

SIEM Query:

source="application_logs" AND (message CONTAINS "//" OR message CONTAINS "faraday" AND status=500)

🔗 References

📤 Share & Export