CVE-2025-47275
Executive Summary
CVE-2025-47275 is a critical vulnerability (CVSS 9.1) in the Auth0-PHP SDK, affecting versions 8.0.0-BETA1 through 8.13.x. The flaw resides in the CookieStore session storage mechanism, where authentication tags are generated with insufficient entropy, making them susceptible to brute-force attacks. An attacker who successfully brute-forces the authentication tag can forge valid session cookies, leading to unauthorized access to applications using the vulnerable SDK. This impacts not only direct users of Auth0-PHP but also downstream SDKs for Symfony, Laravel, and WordPress that depend on it. The vulnerability is unpatched in versions prior to 8.14.0, and no public exploit code or proof-of-concept is currently available. Immediate upgrade and key rotation are strongly recommended.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is a supply chain risk because it affects the core Auth0-PHP package (available on Packagist/Composer) and propagates to higher-level SDKs:
- Auth0/symfony
- Auth0/laravel-auth0
- Auth0/wordpress
Any application using these packages with CookieStore session storage is vulnerable. The attack does not require authentication, making it a high-severity supply chain threat.
CVSS Breakdown & Threat Level
- CVSS Score: 9.1 (Critical)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
The threat level is critical due to the low attack complexity, no required privileges, and the potential for full compromise of session integrity.
Deep Dive & Mechanics
The vulnerability originates in the CookieStore class of the Auth0-PHP SDK. When storing session data in cookies, the SDK generates an authentication tag (MAC) to ensure integrity. However, the tag generation uses a weak random source or insufficient key space, allowing an attacker to brute-force valid tags offline.
Attack Flow:
- The attacker obtains a valid session cookie (e.g., by intercepting network traffic or through a separate vulnerability).
- The attacker extracts the encrypted session payload and the authentication tag.
- Using the weak tag generation, the attacker brute-forces possible tag values until a valid one is found.
- The attacker modifies the session payload (e.g., changing user ID or role) and re-encrypts it with the brute-forced tag.
- The forged cookie is sent to the application, which validates the tag and grants unauthorized access.
The vulnerability is exacerbated by the fact that the encryption keys are static and not rotated frequently. The patch in v8.14.0 strengthens the authentication tag generation and adds additional validation.
Vulnerable vs. Patched Code
Vulnerable Code (v8.13.x):
// In CookieStore.php
public function generateTag($data) {
// Weak random generation
$tag = bin2hex(random_bytes(4)); // Only 32 bits of entropy
return hash_hmac('sha256', $data, $this->encryptionKey . $tag);
}
Patched Code (v8.14.0):
// In CookieStore.php
public function generateTag($data) {
// Strong random generation
$tag = bin2hex(random_bytes(16)); // 128 bits of entropy
return hash_hmac('sha256', $data, $this->encryptionKey . $tag);
}
The patch increases the tag entropy from 32 bits to 128 bits, making brute-force attacks computationally infeasible. Additionally, the patched version rejects any session cookies generated with the old weak tags.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A valid session cookie from a vulnerable application.
- Network access to intercept or capture cookies.
- Knowledge of the encryption key (if not, the attack is limited to tag brute-force only).
Steps:
- Capture a session cookie using a proxy (e.g., Burp Suite).
- Decode the cookie to extract the encrypted payload and tag.
- Write a script to brute-force the tag:
import hashlib
import hmac
import itertools
import string
# Example: brute-force 4-byte tag
encryption_key = b'your_key_here'
payload = b'encrypted_payload'
for tag in itertools.product(range(256), repeat=4):
tag_bytes = bytes(tag)
computed = hmac.new(encryption_key + tag_bytes, payload, hashlib.sha256).hexdigest()
if computed == captured_tag:
print(f"Found tag: {tag_bytes.hex()}")
break
- Modify the payload (e.g., change user ID) and re-encrypt with the found tag.
- Send the forged cookie to the application.
Blue Team
Detection:
- Monitor for multiple failed authentication attempts from the same IP.
- Alert on unusual session cookie patterns (e.g., repeated tag values).
- Use the Sigma rule below to detect brute-force attempts.
Mitigation:
- Immediately upgrade to v8.14.0.
- Rotate all cookie encryption keys.
- Invalidate all existing sessions after patching.
- Implement rate limiting on session validation endpoints.
Indicators of Compromise (IOCs)
- Network: Unusual number of HTTP requests to session validation endpoints with varying cookie values.
- Logs: Repeated
Invalid authentication tagerrors in application logs. - Cookies: Session cookies with short (8-character hex) authentication tags.
- File: Modified
CookieStore.phpfiles with weakrandom_bytes(4)calls.
Detection Engineering
YARA Rule
rule CVE_2025_47275_Auth0_CookieStore
{
meta:
description = "Detects vulnerable Auth0-PHP CookieStore with weak tag generation"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-47275"
strings:
$weak_tag = "random_bytes(4)" nocase
$cookie_store = "CookieStore" nocase
condition:
$weak_tag and $cookie_store
}
Sigma Rule
title: CVE-2025-47275 - Auth0-PHP CookieStore Brute Force Attempt
id: 8a9b3c2d-1e5f-4a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects multiple invalid authentication tag errors indicating brute-force attempts
author: Valters IT
logsource:
category: application
product: auth0_php
detection:
selection:
EventID: "AUTH_TAG_INVALID"
timeframe: 5m
condition: selection | count() > 10
falsepositives:
- Legitimate network issues
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-47275 - Auth0-PHP CookieStore Brute Force"; flow:to_server; content:"Cookie"; nocase; pcre:"/auth0_session=[a-f0-9]{32}/"; threshold: type both, track by_src, count 20, seconds 60; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade Auth0-PHP to version 8.14.0 or later.
- Rotate all cookie encryption keys.
- Invalidate all existing sessions after the upgrade.
- Audit logs for any signs of exploitation.
Long-term Measures:
- Implement session storage using server-side mechanisms (e.g., Redis, database) instead of cookies.
- Enforce strong encryption key rotation policies.
- Monitor for similar vulnerabilities in downstream SDKs.
Workaround (if upgrade is not possible):
- Disable
CookieStoreand switch to server-side session storage. - Implement additional rate limiting on session validation.
Valters IT
Securing Digital Frontiers