/

CVE-2026-33182

Severity:

HIGH RISK

(7.5)

SSRF in Saloon PHP API Connector URL Handling

CVE-2026-33182

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-522, CWE-918

Impact:

SSRF and Credential Leakage

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Saloon's URL construction logic allowed an absolute endpoint URL to override the connector's base URL, causing requests to be sent directly to an attacker-controlled host.

When endpoints were influenced by user input or configuration, this behavior could lead to server-side request forgery (SSRF) and exposure of authentication headers, cookies, or tokens to third-party servers.

Affected context

This vulnerability affects PHP applications that use Saloon to build API integrations or SDKs and that:

  • Define a trusted base URL on a connector
  • Allow request endpoints to be influenced by user-controlled or loosely validated input (e.g., redirect URIs, callback URLs, webhooks, dynamic API targets)
  • Rely on Saloon to automatically attach authentication headers, cookies, or tokens to outbound requests

In such environments, providing an absolute URL as the endpoint can silently redirect traffic away from the intended upstream API and toward a different host.

Exploit preconditions

  • Attack surface: Server-side HTTP requests performed through Saloon connectors.
  • Required access: Ability to control or significantly influence the request endpoint parameter (directly or indirectly via configuration, query parameters, or application workflows).
  • Trigger point: Saloon's URL-building step where the connector's base URL is combined with the endpoint; if the endpoint is an absolute URL, it is used as-is.
  • Why exploitation is possible: The URL join helper implicitly trusts absolute endpoint URLs and bypasses the base URL constraint, while still applying connector-level authentication and cookies to the resulting request, enabling SSRF and credential exposure.

Why this happens

The underlying flaw stems from how Saloon handled URL composition between a connector's base URL and the per-request endpoint.

Instead of enforcing that endpoints remain relative paths rooted at the connector's base URL, the library treated any valid absolute URL as authoritative, effectively ignoring the configured base URL.

This design maps to:

  • CWE-918: Server-Side Request Forgery (SSRF) because attackers can redirect outbound server requests to arbitrary internal or external hosts.
  • CWE-522: Insufficiently Protected Credentials because the library automatically attaches sensitive authentication material to requests that may leave the intended trust boundary.

Conceptually, this is a trust-boundary violation: a value that should represent a constrained path segment is allowed to redefine the full destination, and the system then propagates sensitive headers to that untrusted destination.

Potential impact

  • SSRF that may target:
  • Internal services not directly exposed to the internet
  • Cloud metadata endpoints or internal admin panels
  • Other sensitive internal network resources
  • Leakage of API keys, bearer tokens, cookies, or signed headers to attacker-controlled hosts
  • Abuse of your server's IP reputation to interact with third-party systems under attacker control
  • Pivoting into internal infrastructure by chaining SSRF with additional vulnerabilities discovered on internal services
  • Unauthorized actions performed against third-party APIs while using your application's credentials

General mitigation guidance

Effective mitigation focuses on constraining where requests can be sent and how endpoints are interpreted:

  • Treat connector endpoints as relative paths by default, and reject or heavily restrict absolute URLs unless there is a clear, vetted need.
  • Introduce an explicit opt-in for absolute URLs, scoped per connector or per request, with strong review and justification.
  • Normalize and validate endpoint values before passing them to Saloon, ensuring they match expected patterns (e.g., path-only, no scheme/host).
  • Implement a network egress policy (e.g., firewall rules, proxy whitelists) so that server-side HTTP clients can reach only approved hosts.
  • Limit which credentials are attached to which requests; avoid sending broad, high-privilege tokens on connectors that may handle user-influenced endpoints.
  • Apply the principle of least privilege to API tokens used by Saloon: scope them narrowly and avoid reusing them across unrelated services.

How teams detect issues like this

Detection generally involves inspection of URL construction patterns and outbound request behavior:

  • Static analysis & code review:
  • Flag any use of Saloon connectors where the endpoint is built from request parameters, query strings, or configuration with user influence.
  • Look for patterns where a value expected to be a "path" can contain a scheme (http/https) or host, and ensure it is validated.
  • Review connectors that automatically apply authentication or cookies to all requests, especially those used with dynamic endpoints.
  • Configuration and policy enforcement:
  • Define internal guidelines that prohibit absolute URLs as endpoints unless explicitly whitelisted.
  • Integrate linting/CI checks to detect unsafe URL-joining behavior or endpoint parameters that are not normalized.
  • Runtime monitoring:
  • Log outbound HTTP destinations from Saloon and alert on unexpected hosts, especially those outside known API domains.
  • Use network-level controls (e.g., proxy logs, firewall logs) to identify unusual egress patterns suggestive of SSRF attempts.

Sources

SourceLink
docs.saloon.devdocs.saloon.dev/upgrade/upgrading-from-v3-to-v4
github.comgithub.com/saloonphp/saloon/security/advisories/GHSA-c83f-3xp6-hfcp

Frequently asked

questions

Yes, if an external user can influence the endpoint value used by a Saloon connector—such as through redirect URIs, callback URLs, or configuration-driven endpoints—then a remote attacker may coerce the server into making outbound requests to attacker-controlled hosts.

An attacker needs the ability to control or meaningfully influence the endpoint passed to Saloon. This does not necessarily require privileged access; it can occur through ordinary features that accept URLs or path segments from users, integrations, or configuration.

The safest pattern is to treat endpoints as relative paths only, reject absolute URLs by default, and introduce a strict opt-in mechanism for connectors that truly need to talk to variable hosts. Complement this with strong validation, network egress controls, and careful scoping of attached credentials.

Design URL-building APIs with explicit trust boundaries: enforce that path parameters cannot override scheme or host, validate and normalize all user-influenced endpoints, and ensure that any functionality enabling dynamic destinations is gated behind deliberate configuration, code review, and least-privilege credential use.

Find out what's already
exploitable in your codebase.