CVE-2026-33942: Saloonphp/saloon Saloon Has Insecure Deserialization Vulnerability

HIGH
Advisory Identifier: GHSA-rf88-776r-rcq9
CWE-502
Published
Advisory Summary

CVE-2026-33942 is a HIGH saloon has insecure deserialization vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Saloonphp/saloon libraries in the Packagist ecosystem. The issue involves saloon has insecure deserialization in accesstokenauthenticator. Remediation is available by upgrading affected packages to version 4.0.0.

CVE-2026-33942 at a Glance

CVE Identifier CVE-2026-33942
GHSA Identifier GHSA-rf88-776r-rcq9
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Saloonphp/saloon
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-33942

To remediate this vulnerability, upgrade all affected Saloonphp/saloon dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

saloonphp/saloon fixed: 4.0.0
Upgrade saloonphp/saloon to 4.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for saloonphp/saloon

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-33942, inspect your project dependencies for Saloonphp/saloon:

inspect dependencies for saloonphp/saloon

Analyze the terminal output to locate any version of Saloonphp/saloon in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Saloonphp/saloon, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2026-33942 Affected Saloonphp/saloon Versions

1 component(s)
Fixed Versions:
4.0.0
Product / Package Ecosystem Affected Versions Fixed Version
saloonphp/saloon
Packagist
< 4.0.0
4.0.0

References

Frequently Asked Questions

What is CVE-2026-33942?
CVE-2026-33942 is a security vulnerability in Saloonphp/saloon involving Saloon has insecure deserialization in AccessTokenAuthenticator under CWE-502: Deserialization of Untrusted Data.
Which Saloonphp/saloon versions are affected?
Affected versions include releases prior to 4.0.0 across affected packages: saloonphp/saloon.
What version fixes CVE-2026-33942?
Upgrading to 4.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is saloonphp/saloon affected?
Yes, saloonphp/saloon is affected in releases prior to 4.0.0. Upgrade your dependency to 4.0.0 or later.
What CWE is associated with CVE-2026-33942?
CVE-2026-33942 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Packagist dependencies for CVE-2026-33942?
Run the dependency tree command: 'inspect dependencies for saloonphp/saloon'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rf88-776r-rcq9",
  "modified" : "2026-03-27T18:33:43Z",
  "published" : "2026-03-27T18:33:43Z",
  "aliases" : [ "CVE-2026-33942" ],
  "summary" : "Saloon has insecure deserialization in AccessTokenAuthenticator",
  "details" : "### Impact\nUsers of the OAuth2 utilities in Saloon, specifically the `AccessTokenAuthenticator` class.\n\n### Patches\nUpgrade to Saloon v4+\n\nUpgrade guide: https://docs.saloon.dev/upgrade/upgrading-from-v3-to-v4\n\n### Description\nThe 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.\n\n### Credits\nSaloon thanks @HuajiHD for finding the issue and recommending solutions and @jonpurvis for applying the fix.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS: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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "saloonphp/saloon"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/saloonphp/saloon/security/advisories/GHSA-rf88-776r-rcq9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33942"
  }, {
    "type" : "WEB",
    "url" : "https://docs.saloon.dev/upgrade/upgrading-from-v3-to-v4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/saloonphp/saloon"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-27T18:33:43Z",
    "nvd_published_at" : "2026-03-26T01:16:28Z"
  }
}