CVE-2026-33942
JSON

8.1high

Saloon has insecure deserialization in AccessTokenAuthenticator (object injection / RCE)

Severity
8.1high CVSS:4.0 by GitHub_M
Exploit likelihood
0.71% (higher than 54% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-rf88-776r-rcq9

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.

Affected

Product or packageVersionsReported by
saloonphp saloon< 4.0.0CVE List
saloonphp/saloon (Packagist)before 4.0.0GitHub Advisory Database
saloon saloonbefore 4.0.0NVD

All scores

GitHub_M8.1high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-502

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

Users of the OAuth2 utilities in Saloon, specifically the AccessTokenAuthenticator class.

Patches

Upgrade to Saloon v4+

Upgrade guide: https://docs.saloon.dev/upgrade/upgrading-from-v3-to-v4

Description

The Saloon PHP library 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 removes PHP serialization from the AccessTokenAuthenticator class requiring users to store and resolve the authenticator manually.

Credits

Saloon thanks @HuajiHD for finding the issue and recommending solutions and @jonpurvis for applying the fix.

NVD (es)

Saloon es una biblioteca PHP que proporciona a los usuarios herramientas para construir integraciones de API y SDKs. Las versiones anteriores a la 4.0.0 utilizaban la función unserialize() de PHP en AccessTokenAuthenticator::unserialize() para restaurar el estado del token OAuth desde la caché o el almacenamiento, con allowed_classes =&gt; true. Un atacante que puede controlar la cadena serializada (por ejemplo, sobrescribiendo un archivo de token en caché o mediante otra inyección) puede proporcionar un objeto 'gadget' serializado. Cuando se ejecuta unserialize(), PHP instancia ese objeto y ejecuta sus métodos mágicos (__wakeup, __destruct, etc.), lo que lleva a la inyección de objetos. En entornos con dependencias comunes (por ejemplo, Monolog), esto puede encadenarse a la ejecución remota de código (RCE). La corrección en la versión 4.0.0 elimina la serialización de PHP de la clase AccessTokenAuthenticator, lo que requiere que los usuarios almacenen y resuelvan el autenticador manualmente.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-33942 changed 2026-03-28CVE Terms of Use
GitHub Advisory DatabaseGHSA-rf88-776r-rcq9 changed 2026-03-27CC-BY-4.0
NVDCVE-2026-33942 changed 2026-06-17Public domain