CVE-2026-33942: CWE-502: Deserialization of Untrusted Data in saloonphp saloon
Saloon is a PHP library that gives users tools to build API integrations and SDKs. Versions prior to 4.0.0 used PHP's unserialize() in AccessTokenAuthenticator::unserialize() to restore OAuth token state from cache or storage, with allowed_classes => true. An attacker who can control the serialized string (e.g. by overwriting a cached token file or via another injection) can supply a serialized "gadget" object. When unserialize() runs, PHP instantiates that object and runs its magic methods (__wakeup, __destruct, etc.), leading to object injection. In environments with common dependencies (e.g. Monolog), this can be chained to remote code execution (RCE). The fix in version 4.0.0 removes PHP serialization from the AccessTokenAuthenticator class requiring users to store and resolve the authenticator manually.
AI Analysis
Technical Summary
Saloon is a PHP library designed to facilitate API integrations and SDK development. Versions before 4.0.0 contain a critical deserialization vulnerability (CVE-2026-33942) due to the use of PHP's unserialize() function in the AccessTokenAuthenticator::unserialize() method. This method restores OAuth token state from cache or storage using unserialize() with allowed_classes set to true, which permits instantiation of any PHP object during deserialization. An attacker capable of controlling the serialized string—such as by overwriting cached token files or injecting serialized data—can supply a crafted 'gadget' object. When unserialize() processes this input, PHP executes magic methods like __wakeup or __destruct, enabling object injection. In environments that include commonly used libraries such as Monolog, these object injection chains can be exploited to achieve remote code execution (RCE). The vulnerability requires no authentication or user interaction and can be triggered remotely if an attacker can influence the serialized data. The patch in Saloon 4.0.0 removes the use of PHP serialization in the AccessTokenAuthenticator, forcing developers to manually handle token storage and retrieval, thereby eliminating the unsafe deserialization vector.
Potential Impact
This vulnerability poses a significant risk to organizations using Saloon versions prior to 4.0.0, especially those that cache OAuth tokens in a manner accessible or modifiable by attackers. Successful exploitation can lead to remote code execution on the affected server, compromising confidentiality, integrity, and availability of systems. Attackers could execute arbitrary code, escalate privileges, pivot within networks, or exfiltrate sensitive data. Since the vulnerability requires no authentication or user interaction and can be triggered remotely, the attack surface is broad. Organizations relying on Saloon for API integrations, particularly in web applications and backend services, face potential full system compromise. The impact is heightened in environments with common PHP dependencies like Monolog that facilitate exploitation chains. Additionally, compromised systems could be used to launch further attacks or serve as footholds in critical infrastructure.
Mitigation Recommendations
The primary mitigation is to upgrade Saloon to version 4.0.0 or later, which removes unsafe PHP serialization in the AccessTokenAuthenticator class. Until upgrading, organizations should audit and restrict access to any cached OAuth token storage to prevent unauthorized modification. Implement strict file permissions and integrity monitoring on token cache files. Avoid using PHP's unserialize() on untrusted data and consider replacing serialization with safer formats like JSON. Review and limit dependencies that could be leveraged in gadget chains, such as Monolog, or update them to versions hardened against object injection. Employ runtime application self-protection (RASP) or web application firewalls (WAFs) with rules to detect and block suspicious serialized payloads. Conduct code reviews and penetration testing focused on deserialization vulnerabilities. Finally, monitor logs for unusual deserialization activity or unexpected object instantiations.
Affected Countries
United States, Germany, United Kingdom, France, Canada, Australia, Japan, South Korea, India, Brazil
CVE-2026-33942: CWE-502: Deserialization of Untrusted Data in saloonphp saloon
Description
Saloon is a PHP library that gives users tools to build API integrations and SDKs. Versions prior to 4.0.0 used PHP's unserialize() in AccessTokenAuthenticator::unserialize() to restore OAuth token state from cache or storage, with allowed_classes => true. An attacker who can control the serialized string (e.g. by overwriting a cached token file or via another injection) can supply a serialized "gadget" object. When unserialize() runs, PHP instantiates that object and runs its magic methods (__wakeup, __destruct, etc.), leading to object injection. In environments with common dependencies (e.g. Monolog), this can be chained to remote code execution (RCE). The fix in version 4.0.0 removes PHP serialization from the AccessTokenAuthenticator class requiring users to store and resolve the authenticator manually.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Saloon is a PHP library designed to facilitate API integrations and SDK development. Versions before 4.0.0 contain a critical deserialization vulnerability (CVE-2026-33942) due to the use of PHP's unserialize() function in the AccessTokenAuthenticator::unserialize() method. This method restores OAuth token state from cache or storage using unserialize() with allowed_classes set to true, which permits instantiation of any PHP object during deserialization. An attacker capable of controlling the serialized string—such as by overwriting cached token files or injecting serialized data—can supply a crafted 'gadget' object. When unserialize() processes this input, PHP executes magic methods like __wakeup or __destruct, enabling object injection. In environments that include commonly used libraries such as Monolog, these object injection chains can be exploited to achieve remote code execution (RCE). The vulnerability requires no authentication or user interaction and can be triggered remotely if an attacker can influence the serialized data. The patch in Saloon 4.0.0 removes the use of PHP serialization in the AccessTokenAuthenticator, forcing developers to manually handle token storage and retrieval, thereby eliminating the unsafe deserialization vector.
Potential Impact
This vulnerability poses a significant risk to organizations using Saloon versions prior to 4.0.0, especially those that cache OAuth tokens in a manner accessible or modifiable by attackers. Successful exploitation can lead to remote code execution on the affected server, compromising confidentiality, integrity, and availability of systems. Attackers could execute arbitrary code, escalate privileges, pivot within networks, or exfiltrate sensitive data. Since the vulnerability requires no authentication or user interaction and can be triggered remotely, the attack surface is broad. Organizations relying on Saloon for API integrations, particularly in web applications and backend services, face potential full system compromise. The impact is heightened in environments with common PHP dependencies like Monolog that facilitate exploitation chains. Additionally, compromised systems could be used to launch further attacks or serve as footholds in critical infrastructure.
Mitigation Recommendations
The primary mitigation is to upgrade Saloon to version 4.0.0 or later, which removes unsafe PHP serialization in the AccessTokenAuthenticator class. Until upgrading, organizations should audit and restrict access to any cached OAuth token storage to prevent unauthorized modification. Implement strict file permissions and integrity monitoring on token cache files. Avoid using PHP's unserialize() on untrusted data and consider replacing serialization with safer formats like JSON. Review and limit dependencies that could be leveraged in gadget chains, such as Monolog, or update them to versions hardened against object injection. Employ runtime application self-protection (RASP) or web application firewalls (WAFs) with rules to detect and block suspicious serialized payloads. Conduct code reviews and penetration testing focused on deserialization vulnerabilities. Finally, monitor logs for unusual deserialization activity or unexpected object instantiations.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-24T19:50:52.104Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69c4854ef4197a8e3b9c70d2
Added to database: 3/26/2026, 1:01:02 AM
Last enriched: 3/26/2026, 1:15:56 AM
Last updated: 3/26/2026, 3:08:33 AM
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.