Junglewise Threat Intelligence

web-token jwt-library denial of service via unbounded PBKDF2 iterations

Severity: high · CVSS 8.7 · Published 2026-06-18

Technologies: Web-Token JWT Library, Web-Token JWT Framework. Vendors: Web-Token.

Executive brief

A vulnerability in the web-token PHP JWT library allows an attacker to crash or slow down a server by sending a specially crafted encrypted token. The library fails to limit the number of mathematical iterations used during decryption, allowing a single request to consume excessive CPU resources. This can lead to a denial-of-service (DoS) condition where the server becomes unresponsive to legitimate users.

Technical details

The vulnerability exists in the PBES2AESKW::unwrapKey() method of the web-token/jwt-library. When processing JSON Web Encryption (JWE) tokens using password-based algorithms (PBES2-HS*+A*KW), the library reads the 'p2c' (iteration count) parameter directly from the JOSE header without an upper bound. An unauthenticated remote attacker can provide a very large iteration count (e.g., PHP_INT_MAX), forcing the server to perform intensive PBKDF2 computations before authentication or decryption fails. This results in uncontrolled resource consumption (CWE-400). Patches introduce a DEFAULT_MAX_COUNT of 1,000,000 iterations to mitigate the risk.

Affected products

  • web-token jwt-library < 3.4.10, >= 4.0.0, < 4.0.7, >= 4.1.0, < 4.1.7
  • web-token jwt-framework <= 4.1.6

Timeline

  • 2026-06-06: disclosed
  • 2026-06-18: advisory

References

Related threats