{"answers":{"affected":"12 open source packages ship an affected version, including web-token/jwt-framework and web-token/jwt-library.","exploited":"There is no known exploitation of GHSA-3prj-6hqw-cm82 in the wild and no public exploit code.","fix":"Upgrade web-token/jwt-framework to a fixed version for your release line: 3.4.10, 4.0.7 or 4.1.7.","what":"GHSA-3prj-6hqw-cm82 is a denial of service vulnerability in web-token/jwt-framework, published on 18 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-3prj-6hqw-cm82 and fix it if it is affected.\n\nWhat it is: GHSA-3prj-6hqw-cm82 is a denial of service vulnerability in web-token/jwt-framework, published on 18 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-3prj-6hqw-cm82 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- web-token/jwt-framework (Packagist): affected all versions; fixed in 3.4.10\n- web-token/jwt-framework (Packagist): affected all versions; fixed in 3.4.10\n- web-token/jwt-framework (Packagist): affected from 4.0.0; fixed in 4.0.7\n- web-token/jwt-framework (Packagist): affected from 4.0.0; fixed in 4.0.7\n- web-token/jwt-framework (Packagist): affected from 4.1.0; fixed in 4.1.7\n- web-token/jwt-framework (Packagist): affected from 4.1.0; fixed in 4.1.7\n- web-token/jwt-library (Packagist): affected all versions; fixed in 3.4.10\n- web-token/jwt-library (Packagist): affected all versions; fixed in 3.4.10\n- web-token/jwt-library (Packagist): affected from 4.0.0; fixed in 4.0.7\n- web-token/jwt-library (Packagist): affected from 4.0.0; fixed in 4.0.7\n- web-token/jwt-library (Packagist): affected from 4.1.0; fixed in 4.1.7\n- web-token/jwt-library (Packagist): affected from 4.1.0; fixed in 4.1.7\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-3prj-6hqw-cm82/ (Markdown: https://insights.sbomify.com/GHSA-3prj-6hqw-cm82/index.md)","id":"GHSA-3prj-6hqw-cm82","markdown":"https://insights.sbomify.com/GHSA-3prj-6hqw-cm82/index.md","name":"GHSA-3prj-6hqw-cm82","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":true,"product_category":"PHP JWT library","requires_auth":"none","summary":"An unauthenticated attacker can cause CPU exhaustion denial of service by sending a JWT with an excessively high PBKDF2 iteration count.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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) \u0026\u0026 $p2c \u003e 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`.","ecosystems":["Packagist"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Impact When a JWE uses a password-based key-encryption algorithm (`PBES2-HS256+A128KW`, `PBES2-HS384+A192KW`, `PBES2-HS512+A256KW`), `PB","id":"GHSA-3prj-6hqw-cm82","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"denial_of_service","year":"2026"},"n_packages":12,"n_references":null,"packages":[{"ecosystem":"Packagist","fixed":["3.4.10"],"introduced":["0"],"last_affected":[],"package":"web-token/jwt-framework","purl":null,"source":"GHSA-3prj-6hqw-cm82"},{"ecosystem":"Packagist","fixed":["3.4.10"],"introduced":["0"],"last_affected":[],"package":"web-token/jwt-framework","purl":"pkg:composer/web-token/jwt-framework","source":"GHSA-3prj-6hqw-cm82"},{"ecosystem":"Packagist","fixed":["4.0.7"],"introduced":["4.0.0"],"last_affected":[],"package":"web-token/jwt-framework","purl":null,"source":"GHSA-3prj-6hqw-cm82"},{"ecosystem":"Packagist","fixed":["4.0.7"],"introduced":["4.0.0"],"last_affected":[],"package":"web-token/jwt-framework","purl":"pkg:composer/web-token/jwt-framework","source":"GHSA-3prj-6hqw-cm82"},{"ecosystem":"Packagist","fixed":["4.1.7"],"introduced":["4.1.0"],"last_affected":[],"package":"web-token/jwt-framework","purl":null,"source":"GHSA-3prj-6hqw-cm82"},{"ecosystem":"Packagist","fixed":["4.1.7"],"introduced":["4.1.0"],"last_affected":[],"package":"web-token/jwt-framework","purl":"pkg:composer/web-token/jwt-framework","source":"GHSA-3prj-6hqw-cm82"},{"ecosystem":"Packagist","fixed":["3.4.10"],"introduced":["0"],"last_affected":[],"package":"web-token/jwt-library","purl":null,"source":"GHSA-3prj-6hqw-cm82"},{"ecosystem":"Packagist","fixed":["3.4.10"],"introduced":["0"],"last_affected":[],"package":"web-token/jwt-library","purl":"pkg:composer/web-token/jwt-library","source":"GHSA-3prj-6hqw-cm82"},{"ecosystem":"Packagist","fixed":["4.0.7"],"introduced":["4.0.0"],"last_affected":[],"package":"web-token/jwt-library","purl":null,"source":"GHSA-3prj-6hqw-cm82"},{"ecosystem":"Packagist","fixed":["4.0.7"],"introduced":["4.0.0"],"last_affected":[],"package":"web-token/jwt-library","purl":"pkg:composer/web-token/jwt-library","source":"GHSA-3prj-6hqw-cm82"},{"ecosystem":"Packagist","fixed":["4.1.7"],"introduced":["4.1.0"],"last_affected":[],"package":"web-token/jwt-library","purl":null,"source":"GHSA-3prj-6hqw-cm82"},{"ecosystem":"Packagist","fixed":["4.1.7"],"introduced":["4.1.0"],"last_affected":[],"package":"web-token/jwt-library","purl":"pkg:composer/web-token/jwt-library","source":"GHSA-3prj-6hqw-cm82"}],"products":null,"published":"2026-06-18","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An unauthenticated attacker can cause CPU exhaustion denial of service by sending a JWT with an excessively high PBKDF2 iteration count.","url":"https://insights.sbomify.com/GHSA-3prj-6hqw-cm82/"}