# PHP JWT Library: PBES2-HS\*+A\*KW unwrap accepts an unbounded p2c iteration count, enabling CPU-amplification denial of service

Advisory record · `GHSA-3prj-6hqw-cm82`

- **Identifiers:** `GHSA-3prj-6hqw-cm82`
- **State:** Confirmed
- **Severity:** CVSS 4.0, no score published
- **Critical:** No
- **Weakness (CWE):** [CWE-400](https://cwe.mitre.org/data/definitions/400.html) · [CWE-770](https://cwe.mitre.org/data/definitions/770.html)
- **Tags:** [Denial of service](https://agentprime.io/advisories/tag/dos.md)
- **Published:** 18 Jun 2026
- **Updated:** 15 Jul 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 18 Jun 2026, 21:09 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `web-token/jwt-library` (Packagist): affected `<3.4.10 || >=4.0.0, <4.0.7 || >=4.1.0, <4.1.7`; fixed in `3.4.10`, `4.0.7`, `4.1.7`
- `web-token/jwt-framework` (Packagist): affected `<3.4.10 || >=4.0.0, <4.0.7 || >=4.1.0, <4.1.7`; fixed in `3.4.10`, `4.0.7`, `4.1.7`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> GHSA-3prj-6hqw-cm82 affects the PHP packages web-token/jwt-library and web-token/jwt-framework at versions before 3.4.10, from 4.0.0 before 4.0.7, and from 4.1.0 before 4.1.7. When a JWE uses a PBES2 password-based key-encryption algorithm, the unwrap step accepts an unbounded PBKDF2 iteration count from the token header, so an unauthenticated attacker can force heavy CPU use with a single crafted token. Upgrade to 3.4.10, 4.0.7, or 4.1.7. Until then, limit the iteration count with a custom header checker or do not enable PBES2 algorithms for untrusted tokens.

Written 13 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- Score not published, CVSS 4.0: `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`, from GitHub Advisory Database

- **CISA KEV:** Not listed.
- **EPSS:** No score.

## Timeline

- 31 Oct 2026, 13:58 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-5739-39v2-5754)

## Sources

- [GitHub Advisory Database: GHSA-3prj-6hqw-cm82](https://github.com/advisories/GHSA-3prj-6hqw-cm82)
- [OSV: GHSA-3prj-6hqw-cm82](https://osv.dev/vulnerability/GHSA-3prj-6hqw-cm82)
- <https://github.com/web-token/jwt-framework/security/advisories/GHSA-3prj-6hqw-cm82>
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/web-token/jwt-library/GHSA-3prj-6hqw-cm82.yaml>
- <https://github.com/web-token/jwt-framework>
- <https://github.com/web-token/jwt-framework/releases/tag/3.4.10>
- <https://github.com/web-token/jwt-framework/releases/tag/4.0.7>
- <https://github.com/web-token/jwt-framework/releases/tag/4.1.7>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-3prj-6hqw-cm82>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-3prj-6hqw-cm82/>. Everything for agents: <https://agentprime.io/llms.txt>.
