GHSA-c42h-56wx-h85q:
laravel-auth0 SDK Deserialization of Untrusted Data vulnerability
N/A
Basic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
auth0/login | composer | >= 7.0.0-BETA1, <= 7.2.1 | 7.2.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability lies in the auth0/auth0-php
SDK, specifically within the CookieStore
class, which is a dependency of auth0/laravel-auth0
. The advisory GHSA-c42h-56wx-h85q for laravel-auth0
points to GHSA-v9m8-9xxp-q492 for auth0-php
as the root cause.
The patch for auth0-php
(commit 04b1f5daa8bdfebc5e740ec5ca0fb2df1648a715
in auth0/auth0-php
, corresponding to version 8.3.1) shows modifications in src/Store/CookieStore.php
. The core of the vulnerability is the use of unserialize()
on cookie data within the decrypt()
method. An attacker could provide a specially crafted cookie containing a serialized PHP object, which, when processed by unserialize()
, could lead to arbitrary code execution or other malicious outcomes.
The fix involves replacing the unserialize()
call with json_decode(..., true)
in the decrypt()
method. Correspondingly, the encrypt()
method was also updated to use json_encode()
instead of serialize()
to ensure data compatibility and security.
Therefore, the primary vulnerable function that would appear in a runtime profile during exploitation is Auth0\SDK\Store\CookieStore::decrypt
from the auth0/auth0-php
package, as it directly handles the deserialization of the potentially malicious cookie data. While laravel-auth0
is the affected package reported by the user, the actual vulnerable code resides in its dependency, auth0-php
.