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-PoC — CVE-2026-29000 - pac4j-jwt (< 4.5.9 / < 5.7.9 / < 6.3.3) JwtAuthenticator authentication bypass PoC | Kitploit
Tools/GitHubGitHub/dua2z3rr/cve-2026-29000-poc
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationCTFPenetration TestingAuthenticationLearning & Education
GitHubdua2z3rr/cve-2026-29000-poc

CVE-2026-29000-PoC

CVE-2026-29000 - pac4j-jwt (< 4.5.9 / < 5.7.9 / < 6.3.3) JwtAuthenticator authentication bypass PoC

View Repository
1218 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-29000 — pac4j-jwt JwtAuthenticator Authentication Bypass PoC

A proof-of-concept for CVE-2026-29000, an authentication bypass in the pac4j-jwt JwtAuthenticator component (CVSS 10.0, Critical).

The script forges a token that impersonates any user with any role — without knowing a single secret — as long as the target exposes its RSA public key.

[!WARNING] This tool is provided for educational purposes and authorized security testing only. It was written to solve the Hack The Box machine "Principal", and the defaults (iss, role, kid) are tailored to that box. Only use it against systems you own or are explicitly authorized to test.


The vulnerability

pac4j-jwt versions < 4.5.9, < 5.7.9, and < 6.3.3 contain a logic flaw in JwtAuthenticator when it processes encrypted JWTs (JWE).

When JwtAuthenticator decrypts a JWE, it attempts to parse the inner token as a SignedJWT. If the inner token is an unsigned PlainJWT (alg: none), the SignedJWT object comes back null and, due to the logic error, the signature-verification path is skipped entirely. The authenticator then builds a user profile straight from the unverified claims.

In other words, the outer JWE encryption — which only requires the server's public key — is mistaken for proof of authenticity, so any attacker who can read the public key can mint fully trusted tokens.

Attack chain

  1. Fetch the target's RSA public key from its JWKS endpoint (e.g. /api/auth/jwks).
  2. Forge an unsigned PlainJWT (alg: none) with attacker-chosen claims (sub, role, iss, …).
  3. Wrap that PlainJWT in a JWE envelope encrypted to the target's public key.
  4. Send the resulting compact JWE as a Bearer token. The vulnerable JwtAuthenticator decrypts it, skips signature verification, and trusts the forged claims.

Requirements

  • Python 3.8+
  • Dependencies from requirements.txt:
root@kitploit:~
pip install -r requirements.txt

(requests, jwcrypto, cryptography)


Usage

root@kitploit:~
python3 exploit.py -u <username> [options]

Options

FlagDescriptionDefault
-t, --targetBase URL of the target (e.g. http://host:8080)—
--jwks-urlJWKS endpoint path/api/auth/jwks
--jwks-fileLoad JWKS from a local file instead of fetching from --target—
-u, --usernameValue for the sub claim (required)—
--roleValue for the role claimROLE_ADMIN
--issValue for the iss claimprincipal-platform
--expToken validity in seconds3600
--verify-endpointProtected endpoint to test the forged token against (e.g. /api/settings)—
-k, --insecureDisable TLS certificate verificationoff
-o, --outputWrite the forged JWE to a file instead of stdoutstdout
-v, --verbosePrint the forged JWT payload to stderroff

You must provide either --target (to fetch the JWKS over the network) or --jwks-file (to supply it locally).

Examples

Forge an admin token by fetching the public key from the target and print it to stdout:

root@kitploit:~
python3 exploit.py -t http://target:8080 -u admin

Forge a token, then automatically test it against a protected endpoint:

root@kitploit:~
python3 exploit.py -t http://target:8080 -u admin \
    --verify-endpoint /api/settings -v

Use a locally saved JWKS and save the token to a file:

root@kitploit:~
python3 exploit.py --jwks-file jwks.json -u admin -o token.jwe

Remediation

Upgrade org.pac4j:pac4j-jwt to a patched release:

  • 4.x line → 4.5.9 or newer
  • 5.x line → 5.7.9 or newer
  • 6.x line → 6.3.3 or newer

License

Released under the MIT License.

Download Tool