pac4j-jwt JwtAuthenticator Authentication Bypass
Date: March 04, 2026
CVSS 3.0: 9.1 (Critical)
What is CVE-2026-29000?
CVE-2026-29000 is a critical authentication bypass vulnerability affecting pac4j-jwt version 6.0.3 and related implementations utilizing nested JWT/JWE authentication flows. The vulnerability exists within the JwtAuthenticator validation logic, where the application improperly validates the cryptographic structure of tokens while failing to correctly verify the identity and signature requirements of the inner JWT payload.
In vulnerable implementations, attackers can create unsigned JWTs using the "alg":"none" header and supply arbitrary claims such as administrative roles or privileged usernames. The application accepts the token as authenticated despite the absence of a valid cryptographic signature.
The vulnerability is especially dangerous in environments utilizing stateless authentication APIs and role-based authorization controls, as successful exploitation may result in complete administrative compromise of the application.
Disclosure Information
The vulnerability was publicly disclosed in 2026 and assigned CVE-2026-29000. Research demonstrated that affected pac4j-jwt implementations improperly trusted nested JWT/JWE structures and accepted attacker-controlled identity claims without validating the authenticity of the inner token.
How It Works
The vulnerability occurs because the application validates the structure and formatting of the token while failing to properly enforce cryptographic verification of the inner JWT payload.
An attacker can create a forged token similar to:
{
"alg":"none",
"typ":"JWT"
}
The attacker can then include arbitrary claims such as:
{
"sub":"administrator",
"role":"ROLE_ADMIN",
"iss":"principal-platform"
}
Because the vulnerable application does not correctly verify the JWT signature requirements, the malicious token is accepted as valid and processed with full administrative privileges.
Potential Impact
Successful exploitation may result in:
- Authentication bypass
- Administrative account impersonation
- Unauthorized access to protected APIs
- Disclosure of sensitive application data
- Credential harvesting
- Privilege escalation
- Potential full server compromise
Mitigation Steps
Recommended mitigation steps include:
- Upgrade pac4j-jwt to a patched release.
- Explicitly disable support for
"alg":"none"JWT processing. - Require strict JWT signature validation for all authentication flows.
- Validate both the cryptographic signature and identity claims of nested JWT/JWE tokens.
- Implement allowlists for accepted signing algorithms.
- Use short-lived tokens with strict issuer and audience validation.
- Perform security reviews of all custom JWT authentication middleware.
Educational Usage
This vulnerability was utilized during the Hack The Box “Principal” machine to obtain initial administrative access. Exploitation involved reviewing the application JavaScript source, identifying the pac4j-jwt authentication implementation, creating an unsigned JWT with administrative claims, and supplying the forged token through the HTTP Authorization header to bypass authentication controls.
Sources
- NVD: CVE-2026-29000
- pac4j Project Repository
- RFC 7519 - JSON Web Token (JWT)
- RFC 7516 - JSON Web Encryption (JWE)