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-33942

CVE-2026-33942: Insecure Deserialization to RCE in Saloon PHP

Amit Schendel
Amit Schendel
Senior Security Researcher

Mar 27, 2026·5 min read·90 visits

Executive Summary (TL;DR)

CVE-2026-33942 is a critical insecure deserialization flaw in Saloon PHP (<4.0.0). By injecting crafted serialized objects into token caches, attackers can trigger PHP gadget chains to achieve unauthenticated Remote Code Execution.

Saloon PHP library versions prior to 4.0.0 suffer from a critical insecure deserialization vulnerability. Unsafe handling of cached OAuth tokens in the AccessTokenAuthenticator class allows attackers to achieve Remote Code Execution (RCE) via PHP object injection.

Vulnerability Overview

Saloon is a PHP library used for building API integrations and SDKs. Versions of saloonphp/saloon prior to 4.0.0 contain a critical insecure deserialization vulnerability designated as CVE-2026-33942 (CWE-502). The flaw resides in the AccessTokenAuthenticator class, specifically in the mechanism used to restore OAuth token states from cache or storage.

The vulnerability yields a CVSS 3.1 score of 9.8, reflecting its maximum impact on confidentiality, integrity, and availability. Successful exploitation allows an attacker to achieve unauthenticated Remote Code Execution (RCE). This requires the attacker to manipulate the serialized cache or storage files that the application subsequently reads.

This vulnerability primarily affects PHP applications that rely heavily on Saloon for API management with token caching enabled. Environments where the storage mechanism lacks strict access controls or file integrity monitoring are particularly susceptible to exploitation.

Root Cause Analysis

The root cause of CVE-2026-33942 is the unsafe usage of PHP's native unserialize() function. The AccessTokenAuthenticator::unserialize() method accepts a string payload and passes it directly to unserialize(). The implementation explicitly sets the allowed_classes option to true, which is the default but highly dangerous behavior for untrusted data.

When unserialize() processes a crafted serialized string, it instantiates the encoded objects regardless of their original intent. During the instantiation or destruction phases, PHP automatically invokes magic methods such as __wakeup(), __destruct(), or __toString(). This mechanism forms the basis of PHP Object Injection.

The vulnerability itself provides the entry point, but achieving RCE requires a secondary component known as a gadget chain. Attackers leverage classes already present in the application's autoloader, including common dependencies like Monolog or Guzzle. By chaining these objects together, the attacker constructs a sequence of method calls that ultimately execute arbitrary operating system commands.

Code Analysis

In Saloon v3.x, the AccessTokenAuthenticator class implemented custom serialization methods that wrapped PHP's native functionality without any input validation. The vulnerable code path explicitly allowed the deserialization of any class available in the autoloader.

// Pre-patch code (v3.x)
public function serialize(): string
{
    return serialize($this);
}
 
public static function unserialize(string $string): static
{
    // VULNERABLE: allowed_classes is set to true
    return unserialize($string, ['allowed_classes' => true]);
}

The maintainers addressed this flaw in commit d418356b6257a847f92a0bfa0c2d48bb379c731d by completely removing the serialize() and unserialize() methods. This architectural change eliminates the attack surface entirely.

// Post-patch code (v4.0.0)
// The serialize() and unserialize() methods have been completely removed.
// Developers must now implement custom persistence using safe formats like JSON.

By stripping out the native serialization wrapping, developers are forced to manage token persistence manually. The recommended approach utilizes json_encode() and json_decode(), which process data strictly as standard objects or associative arrays and do not trigger PHP magic methods.

Exploitation Methodology

Exploitation proceeds in three distinct phases. First, the attacker must achieve injection. Since the vulnerability processes cached token states, the attacker must overwrite the cache file or inject a payload into the database field where the serialized token is stored. This often relies on a secondary file upload flaw or weak directory permissions.

Second, the attacker generates the serialized payload using tools like PHPGGC (PHP Generic Gadget Chains). They select a gadget chain compatible with the application's specific dependency tree. For example, if the application uses Monolog, the attacker might generate a Monolog/RCE1 payload designed to execute a specific bash command.

Finally, the application triggers the payload when it attempts to authenticate an API request. Saloon reads the compromised cache file and passes the contents to AccessTokenAuthenticator::unserialize(). The execution of the gadget chain results in arbitrary code execution under the context of the web server user.

Impact Assessment & Secondary Flaws

The primary impact of CVE-2026-33942 is complete system compromise via Remote Code Execution. An attacker gaining code execution can read sensitive environment variables, extract database credentials, and pivot to internal networks. The CVSS score of 9.8 reflects the lack of user interaction required and the maximum impact on the environment.

Beyond deserialization, Saloon v3.x exhibited secondary attack surfaces addressed in the v4.0.0 release. Commit 1307b1d72cacdd2c9c20978cdf7a0b720b4bf3bb resolved Server-Side Request Forgery (SSRF) risks. The update modified URLHelper::join to reject absolute URLs in endpoints, preventing the leakage of API credentials to attacker-controlled hosts.

Furthermore, the version 4.0.0 update introduced path traversal prevention in Saloon\Helpers\Storage and strict alphanumeric validation for fixture names. These defense-in-depth measures mitigate the risk of attackers reading arbitrary files or escaping the intended cache directories via manipulated mock files.

Remediation and Mitigation

The definitive remediation is upgrading saloonphp/saloon to version 4.0.0 or later. This release fundamentally alters how authenticators are handled by removing the vulnerable serialization methods entirely. Users must consult the Saloon v3 to v4 Upgrade Guide to adjust their persistence layers accordingly.

For developers migrating to v4.0.0, authenticators must now be persisted using safe formats. The recommended approach is applying json_encode() and json_decode() to store token arrays. This ensures the data is strictly parsed as an associative array or standard object, completely bypassing PHP's object instantiation lifecycle.

If immediate upgrading is impossible, administrators must implement strict access controls on the storage mechanisms used for caching tokens. Ensure cache directories have restrictive permissions (e.g., 0600 or 0700) and validate that database inputs cannot be modified by unprivileged users. Implementing file integrity monitoring on cache directories will help detect unauthorized modifications.

Fix Analysis (2)

Technical Appendix

CVSS Score
9.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
0.33%
Top 45% most exploited

Affected Systems

saloonphp/saloon prior to version 4.0.0PHP applications utilizing Saloon with token caching enabled

Affected Versions Detail

Product
Affected Versions
Fixed Version
saloon
SaloonPHP
< 4.0.04.0.0
AttributeDetail
CWE IDCWE-502
Attack VectorNetwork
CVSS v3.1 Score9.8
ImpactRemote Code Execution (RCE)
EPSS Score0.00325
Exploit StatusProof of Concept via Gadget Chains

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1190Exploit Public-Facing Application
Initial Access
CWE-502
Deserialization of Untrusted Data

Deserialization of untrusted data allowing attacker-controlled object instantiation.

Vulnerability Timeline

Initial foundational improvements for v4 applied to the repository (Commit d418356b).
2026-03-10
SSRF and credential leakage protections added (Commit 1307b1d7).
2026-03-17
Official CVE publication and vendor advisory released.
2026-03-26
Vulnerability detailed in OSV and NVD databases.
2026-03-27

References & Sources

  • [1]GitHub Security Advisory (GHSA-rf88-776r-rcq9)
  • [2]Saloon v3 to v4 Upgrade Guide
  • [3]NVD CVE-2026-33942 Detail
  • [4]Mitre CVE Record

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.

More Reports

•25 minutes ago•CVE-2026-56682
5.3

CVE-2026-56682: Rate Limiter Lockout Bypass via Header Spoofing in 9Router

A rate limiting bypass vulnerability in 9Router versions before 0.5.6 allows unauthenticated remote attackers to circumvent the login progressive lockout mechanism. By manipulating the client-supplied X-9r-Real-Ip HTTP header, an attacker can rotate the tracking IP address, enabling unthrottled brute-force password guessing against the administrative interface.

Alon Barad
Alon Barad
3 views•7 min read
•about 1 hour ago•CVE-2026-58272
5.3

CVE-2026-58272: Username Enumeration via Timing Side-Channel in Sync-in Server

CVE-2026-58272 is a timing side-channel vulnerability in the authentication endpoint of Sync-in Server before version 2.4.1. Unauthenticated remote attackers can distinguish between valid and invalid usernames due to asymmetric execution paths. When processing invalid usernames, the database query returns early, skipping the computationally expensive bcrypt verification path that is normally triggered for valid accounts.

Alon Barad
Alon Barad
4 views•7 min read
•about 2 hours ago•CVE-2026-61612
5.7

CVE-2026-61612: Server-Side Request Forgery Bypass via DNS Resolution in CKAN MCP Server

An input validation bypass in the CKAN MCP Server (NPM package @aborruso/ckan-mcp-server) prior to version 0.4.108 allows remote attackers to perform Server-Side Request Forgery (SSRF). The application's server URL validation mechanism checked hostnames only as literal strings without performing pre-connection DNS resolution. An attacker can bypass these checks using hostnames that resolve to loopback, private, or link-local IP addresses, including the AWS Instance Metadata Service (IMDS). This is the third documented bypass of this protection mechanism, succeeding previous incomplete mitigations in CVE-2026-33060 and CVE-2026-53509.

Alon Barad
Alon Barad
5 views•7 min read
•about 16 hours ago•GHSA-JHJP-4C2Q-XMX4
8.1

GHSA-JHJP-4C2Q-XMX4: Falco k8saudit Plugin Ruleset Bypass via initContainers and ephemeralContainers

A security feature bypass vulnerability in the Falco k8saudit plugin (and its cloud-specific variants) allowed privileged workloads to run undetected. This bypass occurred because the plugin's default extraction logic and rules only evaluated standard containers, completely omitting initContainers and ephemeralContainers.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 17 hours ago•CVE-2026-61630
4.2

CVE-2026-61630: Time-Based One-Time Password (TOTP) Reuse/Replay in nginx-ignition

nginx-ignition is a web-based user interface for managing the Nginx web server. In versions 2.33.0 through 2.35.0, the application is vulnerable to an improper authentication flaw (CWE-287) in its Multi-Factor Authentication (MFA) implementation. The stateless validation of Time-Based One-Time Passwords (TOTP) allows an attacker to reuse a captured, active verification code multiple times within the standard 30-second validity window, successfully bypassing secondary authentication checks if primary credentials are known.

Amit Schendel
Amit Schendel
10 views•5 min read
•about 18 hours ago•CVE-2026-61629
7.5

CVE-2026-61629: CPU Amplification Denial of Service via ParseAcceptLanguage Underscore Bypass

A vulnerability exists in the i18n middleware of nginx-ignition, enabling CPU amplification attacks. By transmitting a crafted Accept-Language header containing malformed tags separated by underscores, an unauthenticated remote attacker can bypass the length-guard threshold of the underlying Go parsing library. Normalization of underscores to hyphens occurs after the initial validation checks, forcing the parser into expensive quadratic-time loops that consume 100% of available CPU resources. This leads to a complete denial of service for the administrative API and potentially degrades the availability of the hosting system. This vulnerability has been resolved in version 2.40.1.

Alon Barad
Alon Barad
7 views•7 min read