Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-29000-Python-PoC-pac4j-JWT-AuthenticationBypass-Poc — 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. | Kitploit
Tools/GitHubGitHub/alihussainzada/cve-2026-29000-python-poc-pac4j-jwt-authenticationbypass-poc
Authentication & AuthorizationPayload GenerationVulnerability AnalysisExploitationWeb Application ExploitationLearning & Education
GitHubalihussainzada/cve-2026-29000-python-poc-pac4j-jwt-authenticationbypass-poc

CVE-2026-29000-Python-PoC-pac4j-JWT-AuthenticationBypass-Poc

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

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.

View Repository
296 months agoNot yet reviewed

CVE-2026-29000 – pac4j JWT Authentication Bypass (Python PoC)

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).


🧠 Vulnerability Overview

pac4j applications may use the following token flow:

  1. User authenticates via /api/auth/login
  2. Server returns an encrypted JWT (JWE)
  3. Client sends token as a Bearer token
  4. Server decrypts the JWE and verifies the inner JWT signature

Due to incorrect handling of the JWT parsing logic, when the inner token is a PlainJWT (unsigned token):

  • toSignedJWT() returns null
  • Signature verification is skipped
  • Claims are accepted as trusted

This allows an attacker to:

  • forge arbitrary claims
  • escalate privileges
  • authenticate as admin

⚠️ Impact

An attacker can:

  • Authenticate as any user
  • Assign arbitrary roles
  • Access protected endpoints
  • Achieve full privilege escalation

No private key is required — only the public key exposed via JWKS.


🧪 Proof of Concept

This repository provides a Python PoC that:

  • Fetches the public key from a JWKS endpoint
  • Creates an unsigned JWT
  • Wraps it inside a JWE token
  • Generates a malicious Bearer token

📦 Requirements

Python 3.x

Install dependencies:

root@kitploit:~
pip install jwcrypto requests

🚀 Usage

root@kitploit:~
python3 poc.py \
--jwks http://target:8080/api/auth/jwks \
--user admin \
--role ROLE_ADMIN

Example output:

root@kitploit:~
=== Malicious JWE Token ===

eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMTI4R0NNIiwiY3R5IjoiSldUIn0...

Use it as:

root@kitploit:~
Authorization: Bearer <TOKEN>

⚠️ Disclaimer

This repository is provided for educational and research purposes only. Do not use this code against systems without proper authorization.


👨‍💻 Author

Ali Hussainzada Application Security Researcher | Bug Hunter

Download Tool