CVE-2025-68129
Executive Summary
CVE-2025-68129 is a critical security vulnerability in the Auth0-PHP SDK and its dependent SDKs (Symfony, Laravel, WordPress). The flaw lies in improper audience validation of access tokens, allowing an attacker to present an ID token as a valid access token. This bypasses authentication and authorization checks, potentially granting unauthorized access to protected resources. The vulnerability affects all applications using Auth0-PHP SDK versions 8.0.0 through 8.17.0, as well as the Symfony, Laravel, and WordPress SDKs that depend on it. The CVSS score is 6.8 (Medium), but the real-world impact can be severe, especially in multi-tenant or API gateway scenarios.
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 particularly dangerous due to its supply chain implications. The Auth0-PHP SDK is a foundational component for several higher-level SDKs (Symfony, Laravel, WordPress). A single flaw in the core SDK propagates to all dependent packages, creating a broad attack surface. Organizations using any of these SDKs must audit their dependency trees and upgrade immediately. The WordPress plugin ecosystem is especially at risk, as many sites may be running outdated versions without active maintenance.
CVSS Breakdown & Threat Level
- CVSS Score: 6.8 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: Low
Threat Level: Medium. While the CVSS score is moderate, the ease of exploitation (no authentication required) and the potential for privilege escalation in multi-tenant environments elevate the risk. The lack of a public PoC or exploit code reduces immediate urgency, but the vulnerability is trivial to exploit once understood.
Deep Dive & Mechanics
The vulnerability stems from improper audience (aud) claim validation in the Auth0-PHP SDK. In OAuth 2.0 and OpenID Connect, access tokens and ID tokens have distinct purposes and audiences:
- Access Token: Used to access APIs. Its
audclaim contains the API identifier (e.g.,https://api.example.com). - ID Token: Used to authenticate the user. Its
audclaim contains the client ID (e.g.,abc123).
The flawed SDK code fails to differentiate between these token types. When validating an access token, it only checks that the token is signed and not expired, but does not verify that the aud claim matches the expected API identifier. An attacker can craft a request using a valid ID token (which they can obtain by logging in) and present it as an access token. The SDK will accept it, granting the attacker access to API endpoints intended only for access tokens.
Technical Flow:
- Attacker obtains a valid ID token from Auth0 (e.g., by authenticating as a low-privilege user).
- Attacker sends a request to a protected API endpoint, including the ID token in the
Authorization: Bearerheader. - The vulnerable SDK decodes the token, verifies the signature (which is valid), and checks the expiration (which is valid).
- The SDK does not validate the
audclaim against the expected API audience. - The request is processed as if it were a valid access token, potentially granting unauthorized access.
Vulnerable vs. Patched Code
Vulnerable Code (Auth0-PHP < 8.18.0):
// In src/Token/Verifier.php
public function verify($token) {
$decoded = $this->decode($token);
// Missing audience validation
if ($this->hasExpired($decoded)) {
throw new Exception('Token expired');
}
return $decoded;
}
Patched Code (Auth0-PHP >= 8.18.0):
// In src/Token/Verifier.php
public function verify($token, $expectedAudience) {
$decoded = $this->decode($token);
if ($this->hasExpired($decoded)) {
throw new Exception('Token expired');
}
// Added audience validation
if (!in_array($expectedAudience, (array)$decoded->aud)) {
throw new Exception('Invalid audience');
}
return $decoded;
}
The patch adds a mandatory $expectedAudience parameter and validates that the token's aud claim contains it. This prevents ID tokens (which have a different audience) from being accepted as access tokens.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A valid Auth0 tenant with a client application configured.
- A target application using the vulnerable SDK.
- An ID token obtained by authenticating as any user.
Exploitation Steps:
- Obtain an ID token from Auth0 (e.g., via the implicit grant flow).
- Identify an API endpoint protected by the vulnerable SDK.
- Send a request with the ID token as the Bearer token:
curl -X GET https://target-api.example.com/protected/resource \
-H "Authorization: Bearer <ID_TOKEN>"
- If successful, the API will respond with data intended only for access tokens.
Lab Setup:
- Deploy a test application using Auth0-PHP v8.17.0.
- Configure Auth0 to issue both ID tokens and access tokens.
- Use a tool like Postman or Burp Suite to replay tokens.
Blue Team (Detection & Response)
Detection:
- Monitor for tokens with
audclaims that do not match the expected API audience. - Log and alert on failed audience validation attempts (if using a patched version).
- Use the YARA and Sigma rules below to detect exploitation attempts.
Response:
- Immediately upgrade to patched versions.
- Invalidate all existing tokens and force re-authentication.
- Review access logs for unauthorized access to protected resources.
Indicators of Compromise (IOCs)
- Network: HTTP requests with
Authorization: Bearerheaders containing JWT tokens where theaudclaim is a client ID (e.g.,abc123) instead of an API identifier (e.g.,https://api.example.com). - Application Logs: Errors or warnings related to token validation, especially "Invalid audience" or "Token type mismatch".
- File System: Presence of vulnerable SDK versions in
composer.jsonorcomposer.lock:auth0/auth0-php:>=8.0.0, <8.18.0auth0/symfony:>=5.0.0, <5.5.0auth0/laravel-auth0:>=7.0.0, <7.19.0auth0/wordpress:>=5.0.0-BETA0, <5.4.0
Detection Engineering
YARA Rule
rule CVE_2025_68129_Auth0_Token_Audience_Bypass {
meta:
description = "Detects exploitation attempts of CVE-2025-68129 by identifying JWT tokens with mismatched audience claims"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-68129"
severity = "high"
strings:
$jwt_header = /eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/
$aud_client_id = /"aud"\s*:\s*"[a-zA-Z0-9]{20,}"/
$aud_api_url = /"aud"\s*:\s*"https?:\/\/[^"]+"/
condition:
$jwt_header and $aud_client_id and not $aud_api_url
}
Sigma Rule
title: CVE-2025-68129 - Auth0 Token Audience Validation Bypass
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests where a JWT token with a client ID audience is used as an access token
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-68129
logsource:
category: webserver
product: apache
service: http
detection:
selection:
http.method: 'GET'
http.url: '*'
http.authorization|contains: 'Bearer '
filter:
http.authorization|re: 'eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+'
http.authorization|contains: '"aud":"'
http.authorization|re: '"aud":"[a-zA-Z0-9]{20,}"'
condition: selection and not filter
falsepositives:
- Legitimate use of ID tokens in non-standard scenarios
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-68129 Auth0 Token Audience Bypass"; flow:to_server; content:"Authorization"; nocase; content:"Bearer "; distance:0; pcre:"/eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/R"; pcre:"/\"aud\":\"[a-zA-Z0-9]{20,}\"/R"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade Auth0-PHP to version 8.18.0 or later.
- Upgrade dependent SDKs:
- Auth0/symfony to >= 5.5.0
- Auth0/laravel-auth0 to >= 7.19.0
- Auth0/wordpress to >= 5.4.0
- Invalidate all existing tokens and force re-authentication.
Long-term Mitigations:
- Implement additional token validation at the application level (e.g., check
audclaim manually). - Use a Web Application Firewall (WAF) to inspect JWT tokens.
- Monitor for anomalous token usage patterns.
- Conduct regular dependency audits using tools like
composer auditor Snyk.
Workaround (if patching is not immediately possible):
- Add custom middleware to validate the
audclaim before passing the token to the SDK. - Restrict API access to only trusted networks.
Valters IT