CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-33182
6.6

CVE-2026-33182: Server-Side Request Forgery and Credential Leakage in Saloon PHP

Amit Schendel
Amit Schendel
Senior Security Researcher

Mar 26, 2026·5 min read·2 visits

PoC Available

Executive Summary (TL;DR)

A flaw in Saloon PHP < 4.0.0 allows attacker-supplied absolute URLs to override the base URL, leaking authentication headers and tokens to third-party servers.

Saloon PHP library versions prior to 4.0.0 are vulnerable to Server-Side Request Forgery (SSRF) and credential leakage. The library's URL construction logic permits absolute URLs provided as endpoints to override the configured base URL, causing the library to transmit sensitive connector-level state to arbitrary attacker-controlled hosts.

Vulnerability Overview

Saloon is a PHP library for building API integrations and Software Development Kits (SDKs). It abstracts HTTP requests and manages connector-level state, including authentication tokens, headers, and session cookies. Developers define a base URL and default credentials for a specific third-party API, expecting all subsequent requests to route through this trusted destination.

The vulnerability occurs when Saloon processes dynamically generated request endpoints. If a developer allows user-supplied data to dictate the endpoint, the library fails to restrict the final destination to the configured base URL. This logic flaw permits an attacker to redirect outbound HTTP requests to infrastructure under their direct control.

Because Saloon automatically attaches the connector's global state to every outbound request, this redirection results in immediate credential exposure. The library inadvertently packages the valid authorization headers intended for the trusted API and transmits them to the attacker's server.

Technical Root Cause Analysis

The core issue resides in the Saloon\Helpers\URLHelper::join() method, which is utilized by the PendingRequest class to construct the final request URI. Prior to version 4.0.0, this method evaluated the provided endpoint string to determine if it was already a valid absolute URL. If the validation check passed, the method returned the absolute URL immediately.

This logic completely discarded the trusted base URL defined within the Saloon connector. Consequently, any state attached to the PendingRequest instance was forwarded to the new destination. The library lacked any structural boundary to separate credentials intended for the primary connector from those required by the specific request.

Since connectors typically apply authentication headers globally, these credentials accompanied the misdirected request. The vulnerability is classified as CWE-918 (Server-Side Request Forgery) because the application fails to validate the upstream destination before dispatching the HTTP payload.

Code Analysis and Patch Verification

The vulnerable implementation simply checked the endpoint format and prioritized it over the base URL. The logic was dangerously simplistic and relied entirely on the developer to sanitize inputs prior to invoking the library methods.

// Pre-patch vulnerability in URLHelper::join()
public static function join(string $baseUrl, string $endpoint): string
{
    if (static::isValidUrl($endpoint)) {
        return $endpoint;
    }
    // Normal relative joining logic follows...
}

The remediation in version 4.0.0 modifies the library to enforce a strict deny-by-default policy for absolute URLs. The URLHelper::join() method was updated to throw an InvalidArgumentException if an absolute URL is detected in the endpoint while a base URL is present.

Developers must now explicitly define the allowBaseUrlOverride boolean property on the Connector, Request, or OAuth configuration. The library enforces a strict hierarchy to resolve this flag, checking the Request configuration first, followed by the OAuth configuration, and finally the Connector level. This explicit opt-in mechanism eliminates the risk of accidental overrides via unvalidated input.

Exploitation Methodology

Exploitation requires a specific architectural pattern where application logic passes unsanitized user input into a Saloon Request class. The attacker targets endpoints that derive their return value from this input, such as dynamic callback URLs or redirect URIs. The attacker submits an absolute URL pointing to an external server they control, such as https://attacker.example.com/capture.

When the application processes the request, Saloon constructs the outbound HTTP payload. The PendingRequest object compiles all defined headers, including Bearer tokens or API keys bound to the connector. The library then issues the HTTP request to the attacker's server instead of the intended API provider.

The attacker monitors their server logs to extract the leaked credentials from the incoming request headers. This process requires zero authentication to the host application and leaves minimal forensic evidence beyond standard access logs.

Impact Assessment

The primary impact of CVE-2026-33182 is a severe compromise of confidentiality. Attackers who successfully exploit this vulnerability obtain highly sensitive API credentials and session tokens. These stolen credentials grant the attacker unauthorized access to the upstream third-party services integrated with the application.

Depending on the privileges associated with the leaked tokens, attackers can manipulate data, trigger unauthorized transactions, or pivot into other connected systems. The impact extends beyond the immediate application, potentially compromising entire external infrastructure environments.

> [!NOTE] > While the host application's local database remains intact, the secondary compromise of external service accounts often results in severe financial or reputational damage.

The CVSS 4.0 score of 6.6 accurately reflects the high confidentiality impact coupled with the lack of direct integrity or availability impacts on the host application itself. The network-based attack vector requires no authentication, lowering the barrier to entry for exploitation.

Remediation and Security Hardening

System administrators and developers must upgrade the Saloon PHP library to version 4.0.0 or later to eliminate the vulnerability. This release enforces the secure-by-default URL handling behavior and prevents arbitrary endpoint overrides. Developers should audit all custom Request classes to identify instances where the resolveEndpoint() method processes user-supplied data.

If an application legitimately requires dynamic base URLs, developers must explicitly enable the allowBaseUrlOverride property. This configuration must only be used in conjunction with strict input validation or hardcoded allowlists. Enabling this feature globally on a Connector is strongly discouraged.

Version 4.0.0 also includes additional security hardening measures beyond the SSRF patch. The maintainers implemented path normalization in the Storage and Fixture helpers to prevent directory traversal attacks. Furthermore, the AccessTokenAuthenticator class was updated to mitigate potential PHP Object Injection vulnerabilities by removing its serialization methods.

Official Patches

SaloonPHPOfficial GitHub Security Advisory

Fix Analysis (2)

Technical Appendix

CVSS Score
6.6/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:U

Affected Systems

Saloon PHP Library (< 4.0.0)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Saloon
SaloonPHP
< 4.0.04.0.0
AttributeDetail
CWE IDCWE-918
Attack VectorNetwork
CVSS Score6.6 (Medium)
ImpactHigh Confidentiality (Credential Leakage)
Exploit StatusProof of Concept Available
AuthenticationNone Required

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1552Unsecured Credentials
Credential Access
CWE-918
Server-Side Request Forgery (SSRF)

The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.

Vulnerability Timeline

Initial vulnerability identified by researcher @HuajiHD
2026-03-09
Preliminary fixes for v4 branch developed by @JonPurvis
2026-03-10
Feature added for explicit opt-in to base URL overrides
2026-03-17
Official security advisory published (GHSA-c83f-3xp6-hfcp)
2026-03-25
CVE-2026-33182 assigned and published to NVD
2026-03-26

References & Sources

  • [1]GitHub Advisory GHSA-c83f-3xp6-hfcp
  • [2]Saloon Upgrade Guide (v3 to v4)
  • [3]Fix Commit (Foundational)
  • [4]Fix Commit (Opt-in Logic)

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.