CVE-2026-33942
Received Received - Intake
PHP Object Injection in Saloon Library Enables Remote Code Execution

Publication date: 2026-03-26

Last updated on: 2026-03-26

Assigner: GitHub, Inc.

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-26
Last Modified
2026-03-26
Generated
2026-05-07
AI Q&A
2026-03-26
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
saloon saloon to 4.0.0 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-502 The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-33942 is a high-severity vulnerability in the Saloon PHP library versions prior to 4.0.0. It occurs in the AccessTokenAuthenticator class, which uses PHP's unserialize() function with allowed_classes set to true to restore OAuth token state from cache or storage.

An attacker who can control the serialized inputβ€”such as by overwriting cached token files or through injectionβ€”can supply a malicious serialized "gadget" object. When unserialize() processes this input, PHP instantiates the object and executes its magic methods (__wakeup, __destruct, etc.), leading to object injection.

In environments with common dependencies like Monolog, this vulnerability can be chained to achieve remote code execution (RCE). The issue is classified under CWE-502 (Deserialization of Untrusted Data).

The fix in Saloon version 4.0.0 removes the use of PHP serialization in the AccessTokenAuthenticator class, requiring users to manually store and resolve the authenticator instead.


How can this vulnerability impact me? :

This vulnerability can allow an attacker who can control serialized input to perform object injection, which in certain environments can lead to remote code execution (RCE).

Remote code execution means an attacker could run arbitrary code on your system, potentially leading to full system compromise, data theft, or disruption of services.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability arises from the use of PHP's unserialize() function with allowed_classes set to true in the AccessTokenAuthenticator::unserialize() method in Saloon versions prior to 4.0.0. Detection involves identifying if your system is running a vulnerable version of the Saloon PHP library and if the AccessTokenAuthenticator class is used to restore OAuth token state from cache or storage.

You can check the installed version of Saloon in your project by running the following command in your project directory:

  • composer show saloonphp/saloon

If the version is prior to 4.0.0, your system is potentially vulnerable.

Additionally, you can search your codebase or cache storage for usage of unserialize() in AccessTokenAuthenticator or look for cached token files that might be overwritten or injected with malicious serialized objects.

For example, to find usage of unserialize in your code, you can run:

  • grep -r 'unserialize' path/to/your/project

To check for suspicious modifications or overwrites of cached token files, monitor file changes or audit logs related to the cache directory used by Saloon.


What immediate steps should I take to mitigate this vulnerability?

The primary and recommended mitigation is to upgrade the Saloon PHP library to version 4.0.0 or later, where the vulnerability is fixed by removing the use of PHP serialization in the AccessTokenAuthenticator class.

Until you can upgrade, avoid using versions prior to 4.0.0 and do not allow untrusted input to control serialized data used by AccessTokenAuthenticator.

Additionally, review and secure your cache or storage mechanisms to prevent attackers from overwriting or injecting malicious serialized objects.

Follow the official upgrade guide at https://docs.saloon.dev/upgrade/upgrading-from-v3-to-v4 to ensure a smooth and secure transition.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability in Saloon PHP library allows remote code execution through object injection by exploiting unsafe deserialization of OAuth token data. This can lead to unauthorized access or control over systems handling sensitive data.

Such unauthorized access or potential data breaches can negatively impact compliance with common standards and regulations like GDPR and HIPAA, which require strict controls over data confidentiality, integrity, and system security.

Therefore, if exploited, this vulnerability could result in violations of these regulations due to compromised data security and privacy.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart