CVE-2026-33942·PHP vulnerability
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.
- Severity
- critical
- Software
- PHP
- Fixed in
- 4.0.0
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.43% — higher than 62% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2026-33942 scores 9.8 on CVSS, so a successful attack would be serious — but at 0.43%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
Until: 4.0.0
Fixed in: 4.0.0
How to fix this CVE
Update the Saloon PHP library to version 4.0.0 or later to eliminate the unsafe object deserialization vulnerability in the OAuth token handling mechanism. If you are using Saloon in your PHP application, upgrade immediately and refactor any code that relied on automatic token serialization to manually manage token storage and restoration. Verify that all cached token files are regenerated after the upgrade to prevent injection of malicious gadget chains.
sudo dnf update php php-common php-cliDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your installed PHP version and Saloon library version by running: php -v && composer show saloon/saloon 2>/dev/null || echo 'Saloon not found via Composer'
- Step 2: Search your application codebase for uses of AccessTokenAuthenticator and serialized token storage: grep -r 'AccessTokenAuthenticator' . && grep -r 'serialize\|unserialize' . | grep -i token
- Step 3: Review logs for evidence of object injection attempts by searching for unexpected class instantiation or magic method invocation patterns in your application error logs and PHP logs: grep -i '__wakeup\|__destruct\|gadget' /var/log/php*.log /var/log/apache2/error.log 2>/dev/null
- Step 4: After upgrading, verify the fix by checking that composer.lock shows Saloon version 4.0.0 or later: composer show saloon/saloon | grep Version
FAQ
What is CVE-2026-33942?
CVE-2026-33942 is a critical PHP object injection vulnerability in the Saloon library's AccessTokenAuthenticator class that uses unsafe deserialization of cached OAuth tokens, allowing attackers to instantiate arbitrary objects and trigger magic methods that may lead to remote code execution.
Is CVE-2026-33942 being actively exploited?
No, CVE-2026-33942 is not currently listed on CISA's Known Exploited Vulnerabilities catalog, and no public exploits have been disclosed, though the attack surface is real in environments with common PHP gadget chains like Monolog.
What versions of PHP are affected by CVE-2026-33942?
All versions of Saloon prior to 4.0.0 are affected. The vulnerability exists in the AccessTokenAuthenticator's unserialize() method which was removed in version 4.0.0.
How do I check if my server is vulnerable to CVE-2026-33942?
Run 'composer show saloon/saloon' to check the installed version; if it reports anything below 4.0.0, your installation is vulnerable. Additionally, check your token cache storage location for serialized files: find . -name '*.cache' -o -name '*token*' | xargs file | grep -i serialized
Does Defensia detect CVE-2026-33942?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Saloon is installed on a monitored server, CVE-2026-33942 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-33942. Free for 1 server.
Get started free