CVE-2026-25765: Faraday SSRF Vulnerability via Protocol-Relative URL Host Override

faraday Updated 12 Feb 2026

Summary

09/02/2026
Yes i
Moderate
5.8

CVE-2026-25765: Faraday affected by SSRF via protocol-relative URL host override in build_exclusive_url. Affects faraday versions < 2.14.1. Fixed in 2.14.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Faraday is a popular HTTP client library for Ruby, designed to simplify the process of making HTTP requests. It provides a flexible interface for building connections and supports various adapters for different HTTP backends. However, Faraday is vulnerable to a Server-Side Request Forgery (SSRF) issue due to improper handling of user-supplied URLs in its request methods.

Vulnerability Detail

The vulnerability arises from Faraday's build_exclusive_url method, which uses Ruby's URI#merge to combine the base URL with user-supplied paths. According to RFC 3986, protocol-relative URLs (e.g., //evil.com/path) can override the base URL's host component, allowing an attacker to redirect requests to arbitrary hosts. This can lead to SSRF attacks, where an attacker can exploit the application to send requests to internal services or external malicious endpoints.

How To Fix

Minimum fixed version

2.14.1

This is the first release that contains the fix.

gem install faraday -v 2.14.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading is not immediately feasible, you can implement input validation to mitigate the risk. Here is an example of how to validate user input before passing it to Faraday request methods:

def safe_path(user_input)
  raise ArgumentError, 'Invalid path' if user_input.match?(%r{\A//[^/]})
  user_input
end

This function raises an error for any input that starts with // followed by a non-/ character.

Conclusion

The SSRF vulnerability in Faraday (CVE-2026-25765) poses a significant risk to applications that utilize user-controlled input in request methods. It is crucial to upgrade to version 2.14.1 or later to mitigate this risk. Additionally, implementing input validation can serve as a temporary workaround until the upgrade is completed.

See every vulnerability recorded for faraday →

Share this vulnerability

FAQ

Server-Side Request Forgery (SSRF) is a vulnerability that allows an attacker to send crafted requests from a vulnerable server to internal or external resources.

If your application uses Faraday versions up to 2.14.0 and allows user-controlled input in request methods, it may be vulnerable. You can use Vulert to check for vulnerabilities in your application.

SSRF vulnerabilities can lead to data leakage, unauthorized access to internal services, and exploitation of other vulnerabilities within the network.

Yes, you can use tools like Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software using just a manifest file.

The CVSS score for this vulnerability is 5.8, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for faraday.

How To Fix

Minimum fixed version

2.14.1

This is the first release that contains the fix.

gem install faraday -v 2.14.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback