packagist package report

Is web-token/jwt-framework safe?

2 known vulnerabilities, worst severity HIGH.

// reach

0 direct dependencies

none carry a known advisory

    0 packages depend on it

    an advisory here reaches each of them

      Create a free accountfor every dependency path, dependent and what to upgrade
      // ai model usage

      Tracked for PyPI packages. HuggingFace models declare Python dependencies, so packagist packages are not covered.


      cvss
      0.0
      high

      severity band, no base score published

      epss
      not scored

      chance of exploitation in 30 days

      xyz score
      not scored

      CyberXYZ composite out of 10

      fig. 01 — GHSA-3prj-6hqw-cm82, the advisory selected below

      // 2 advisories

      GHSA-3prj-6hqw-cm82

      HIGH
      // 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 algorithm in their decryption AlgorithmManager.

      // patches

      PBES2AESKW now enforces a configurable maximum iteration count (DEFAULTMAXCOUNT = 1000000, 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.

      // workarounds

      Before upgrading: validate/limit the p2c header with a custom header checker, or do not enable PBES2 algorithms for untrusted tokens.

      // references
      • RFC 7518 §4.8 (PBES2)
      • CWE-400: Uncontrolled Resource Consumption
      // résolution

      Un 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).

      PBES2 — PBES2AESKW::unwrapKey() borne désormais le paramètre p2c (constante DEFAULTMAXCOUNT = 1000000, configurable via le constructeur) avant tout appel à hashpbkdf2(), empêchant l'amplification CPU (DoS).

      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.


      Checked 2026-09-26 at 01:00 UTC. The most recent advisory here was published 2026-06-18. Updated continuously from NVD, GHSA, OSV and CNA feeds.

      Think a verdict here is wrong? Tell us — we respond within 2 business days.