{"id":"CVE-2026-134461","aliases":["CVE-2026-134461","GHSA-3prj-6hqw-cm82"],"related":[],"kind":"vulnerability","state":"published","title":"Web-Token jwt-framework before 3.4.10 DoS via Unbounded PBES2 p2c Iteration Count","summary":"Web-Token jwt-framework and jwt-library before 3.4.10, 4.0.0 before 4.0.7, and 4.1.0 before 4.1.7 contain an uncontrolled resource consumption vulnerability in PBES2AESKW::unwrapKey(), which passes the attacker-controlled p2c JWE header value to hash_pbkdf2() without an upper bound. Unauthenticated attackers can send a JWE using a PBES2-HS*+A*KW algorithm with a huge p2c iteration count to force lengthy PBKDF2 computations and exhaust server CPU.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Web-Token jwt-framework and jwt-library before 3.4.10, 4.0.0 before 4.0.7, and 4.1.0 before 4.1.7 contain an uncontrolled resource consumption vulnerability in PBES2AESKW::unwrapKey(), which passes the attacker-controlled p2c JWE header value to hash_pbkdf2() without an upper bound. Unauthenticated attackers can send a JWE using a PBES2-HS*+A*KW algorithm with a huge p2c iteration count to force lengthy PBKDF2 computations and exhaust server CPU.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nWhen a JWE uses a password-based key-encryption algorithm (`PBES2-HS256+A128KW`, `PBES2-HS384+A192KW`, `PBES2-HS512+A256KW`), `PBES2AESKW::unwrapKey()` reads the `p2c` (PBKDF2 iteration count) parameter directly from the attacker-controlled JOSE header and passes it to `hash_pbkdf2()` with **no upper bound**. The only validation performed (`checkHeaderAdditionalParameters()`) was `is_int($p2c) && $p2c > 0`.\n\nAn unauthenticated attacker can craft a single JWE whose protected header sets a very large `p2c` (e.g. `100_000_000` ≈ 87 s of CPU, or `PHP_INT_MAX`), forcing a worker to spend an arbitrary amount of CPU inside PBKDF2 **before** the key unwrap can even fail. The decrypter swallows the eventual exception, so the attacker pays almost nothing while the server burns CPU. JSON General serialization (multiple recipients) and multi-key JWKSets multiply the cost. This is a classic uncontrolled-resource-consumption (CWE-400) denial of service.\n\n### Affected configurations\n\nApplications that register any `PBES2-HS*+A*KW` algorithm in their decryption `AlgorithmManager`.\n\n### Patches\n\n`PBES2AESKW` now enforces a configurable maximum iteration count (`DEFAULT_MAX_COUNT = 1_000_000`, well above realistic legitimate values which are a few thousand) in `checkHeaderAdditionalParameters()`, before any PBKDF2 computation. The bound is exposed as a constructor argument so operators can tune it.\n\n### Workarounds\n\nBefore upgrading: validate/limit the `p2c` header with a custom header checker, or do not enable PBES2 algorithms for untrusted tokens.\n\n### References\n\n- RFC 7518 §4.8 (PBES2)\n- CWE-400: Uncontrolled Resource Consumption\n\n## Résolution\n\nUn correctif a été préparé sur une branche dédiée basée sur `3.4.x`, avec des tests anti-régression dédiés (fork privé temporaire de cette advisory, PR #1).\n\n**PBES2** — `PBES2AESKW::unwrapKey()` borne désormais le paramètre `p2c` (constante `DEFAULT_MAX_COUNT = 1_000_000`, configurable via le constructeur) avant tout appel à `hash_pbkdf2()`, empêchant l'amplification CPU (DoS).\n\n**Validation :** `php -l` OK, PHPUnit vert, aucune nouvelle erreur PHPStan introduite (différentiel nul vs `3.4.x`), aucun commentaire ajouté dans le code source. Après merge, cascade prévue `3.4.x → 4.0.x → 4.1.x`.","format":"markdown","source":"ghsa"}],"published":"2026-06-18T21:09:01.000Z","modified":"2026-11-23T19:17:34.553Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-400","CWE-770"],"affected":[{"ranges":[{"type":"semver","introduced":"3.3.0","fixed":"3.4.10","status":"affected"},{"type":"semver","version":"3.4.10","status":"unaffected"}],"vendor":"web-token","product":"jwt-library","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.0.0","fixed":"4.0.7","status":"affected"},{"type":"semver","version":"4.0.7","status":"unaffected"}],"vendor":"web-token","product":"jwt-library","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.1.0","fixed":"4.1.7","status":"affected"},{"type":"semver","version":"4.1.7","status":"unaffected"}],"vendor":"web-token","product":"jwt-library","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","fixed":"3.4.10","status":"affected"},{"type":"semver","version":"3.4.10","status":"unaffected"}],"vendor":"web-token","product":"jwt-framework","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.0.0","fixed":"4.0.7","status":"affected"},{"type":"semver","version":"4.0.7","status":"unaffected"}],"vendor":"web-token","product":"jwt-framework","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.1.0","fixed":"4.1.7","status":"affected"},{"type":"semver","version":"4.1.7","status":"unaffected"}],"vendor":"web-token","product":"jwt-framework","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.4.10"}],"ecosystem":"Packagist","package":"web-token/jwt-library","purl":"pkg:composer/web-token/jwt-library","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.4.10"}],"ecosystem":"Packagist","package":"web-token/jwt-framework","purl":"pkg:composer/web-token/jwt-framework","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0","status":"affected","fixed":"4.0.7"}],"ecosystem":"Packagist","package":"web-token/jwt-library","purl":"pkg:composer/web-token/jwt-library","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.1.0","status":"affected","fixed":"4.1.7"}],"ecosystem":"Packagist","package":"web-token/jwt-library","purl":"pkg:composer/web-token/jwt-library","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0","status":"affected","fixed":"4.0.7"}],"ecosystem":"Packagist","package":"web-token/jwt-framework","purl":"pkg:composer/web-token/jwt-framework","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.1.0","status":"affected","fixed":"4.1.7"}],"ecosystem":"Packagist","package":"web-token/jwt-framework","purl":"pkg:composer/web-token/jwt-framework","source":"ghsa"}],"references":[{"url":"https://github.com/web-token/jwt-framework/security/advisories/GHSA-3prj-6hqw-cm82","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/web-token-jwt-framework-before-3.4.10-dos-via-unbounded-pbes2-p2c-iteration-count","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/web-token/jwt-library/GHSA-3prj-6hqw-cm82.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/web-token/jwt-framework","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/web-token/jwt-framework/releases/tag/3.4.10","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/web-token/jwt-framework/releases/tag/4.0.7","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/web-token/jwt-framework/releases/tag/4.1.7","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-11-23T18:37:46.563Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-134461","url":"https://www.cve.org/CVERecord?id=CVE-2026-134461","licence":"CVE Terms of Use","modified":"2026-11-23T18:38:39.420Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3prj-6hqw-cm82","url":"https://github.com/advisories/GHSA-3prj-6hqw-cm82","licence":"CC-BY-4.0","modified":"2026-11-21T18:11:27.253Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-134461","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-134461","licence":"Public domain","modified":"2026-11-23T19:17:34.553Z"}],"updatedAt":"2026-11-25T22:59:52.567Z","epss":{"score":0.00546,"percentile":0.47191,"date":"2026-12-01T12:00:22.000Z"}}