Skip to content
SSRF Write-up Intermediate

How Neo found an SSRF vulnerability in Faraday, and why it matters for every team that ships code

Faraday, a Ruby HTTP client library, allowed a caller-supplied path beginning with two slashes to override the destination host when building a request URL. An attacker who could influence that path could redirect the server's outbound requests to an arbitrary host, constituting SSRF.

projectdiscovery.io

Published on projectdiscovery.io

Neo found a Server-Side Request Forgery (SSRF) vulnerability in Faraday, a widely used HTTP client library in the Ruby ecosystem. This is Neo’s first credited CVE discovery.

The author, on projectdiscovery.io

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the URL-building logic treated any input starting with a single slash as a safe path, without accounting for the special two-slash form that URL parsers interpret as an authority (host) component.

Impact

If an attacker can influence the path value, they could redirect where the server sends requests, enabling SSRF; the text does not describe further exploitation beyond this redirection.

What the attacker needed

Attacker can influence the path value; application uses Faraday to make outbound requests

The fix

The issue was fixed in Faraday 2.14.1, as stated in the text.

How it was found

  1. Create a Faraday connection with a trusted base URL.
  2. Pass a path that begins with two slashes followed by an attacker-controlled host.
  3. Observe that the resulting request is sent to the attacker-controlled host instead of the base URL.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

SSRF (Server-Side Request Forgery) is when an attacker can make your server send a request to a destination they choose, rather than the one you intended. Here, Faraday tried to keep requests on a trusted base URL, but a path starting with two slashes was interpreted by URL rules as a new host, so the request went somewhere else.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.