PHP JWT Library: PBES2-HS*+A*KW unwrap accepts an unbounded p2c iteration count, enabling CPU-amplification denial of service
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (web-token/jwt-library 4.1.7, 4.0.7, 3.4.10; web-token/jwt-framework 4.1.7, 4.0.7, 3.4.10), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
Packagist web-token/jwt-library
- Affected
- < 3.4.10>= 4.0.0, < 4.0.7>= 4.1.0, < 4.1.7
- Fixed in
- 4.0.7, 3.4.10, 4.1.7
Packagist web-token/jwt-framework
- Affected
- < 3.4.10>= 4.0.0, < 4.0.7>= 4.1.0, < 4.1.7
- Fixed in
- 4.0.7, 3.4.10, 4.1.7
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-3prj-6hqw-cm82 lists affected ranges: Packagist web-token/jwt-library >=0 =4.0.0 =4.1.0 =0 =4.0.0 =4.1.0 <4.1.7
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS 4.0
- 8.7 · 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 source
- EPSS
- No dated EPSS signal available.
Source description
As published by the source; long descriptions are shortened.
Impact When 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 hashpbkdf2() with no upper bound. The only validation performed (checkHeaderAdditionalParameters()) was isint($p2c) && $p2c 0. An unauthenticated attacker can craft a single JWE whose protected header sets a very large p2c (e.g. 100000000 ≈ 87 s of CPU, or PHPINTMAX), 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. Affected configurations Applications that register any PBES2-HS+AKW…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 1 · created ·
Published from ghsa record GHSA-3prj-6hqw-cm82
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: GHSA-3prj-6hqw-cm82 Advisory: PHP JWT Library: PBES2-HS*+A*KW unwrap accepts an unbounded p2c iteration count, enabling CPU-amplification denial of service IDs: GHSA-3prj-6hqw-cm82 Record: https://patchnext.com/advisories/ghsa-3prj-6hqw-cm82 (revision 1, source checked 26 Oct 2026, 14:50 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: High (CVSS 8.7) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: web-token/jwt-library 4.1.7, 4.0.7, 3.4.10; web-token/jwt-framework 4.1.7, 4.0.7, 3.4.10. A vendor fix does not mean a deployment is fixed. ## Affected components - Packagist web-token/jwt-library: affected < 3.4.10; >= 4.0.0, < 4.0.7; >= 4.1.0, < 4.1.7; fixed in 4.0.7, 3.4.10, 4.1.7 - Packagist web-token/jwt-framework: affected < 3.4.10; >= 4.0.0, < 4.0.7; >= 4.1.0, < 4.1.7; fixed in 4.0.7, 3.4.10, 4.1.7 ## Suggested inspection (read-only) - Packagist web-token/jwt-library: check the installed version with your package manager. - Packagist web-token/jwt-framework: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on web-token/jwt-library, web-token/jwt-framework. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-3prj-6hqw-cm82 (GitHub-reviewed advisory GHSA-3prj-6hqw-cm82 lists affected ranges: Packagist web-token/jwt-library >=0 =4.0.0 =4.1.0 =0 =4.0.0 =4.1.0 <4.1.7) Commands are suggestions: review each one before running it.
Loading voting…