Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

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

0
High
Published: 06/18/2026 (06/18/2026, 21:09:01 UTC)
Source: GCVE Database
Product: web-token/jwt-library

Description

The PHP JWT Library contains a vulnerability in its PBES2-HS*+A*KW key unwrapping implementation where the iteration count parameter (p2c) from the attacker-controlled JOSE header is not properly bounded. This allows an unauthenticated attacker to specify an extremely large iteration count, causing excessive CPU consumption during PBKDF2 computation and resulting in a denial of service. The vulnerability affects applications that enable PBES2 algorithms for decryption. A patch has been introduced that enforces a configurable maximum iteration count to prevent CPU amplification attacks.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

Packagistghsa
web-token/jwt-library
Affected versions
<3.4.10
Packagistghsa
web-token/jwt-framework
Affected versions
<3.4.10
Packagistghsa
web-token/jwt-library
Affected versions
>=4.0.0 <4.0.7
Packagistghsa
web-token/jwt-library
Affected versions
>=4.1.0 <4.1.7
Packagistghsa
web-token/jwt-framework
Affected versions
>=4.0.0 <4.0.7
Packagistghsa
web-token/jwt-framework
Affected versions
>=4.1.0 <4.1.7

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/16/2026, 10:57:56 UTC

Technical Analysis

The vulnerability exists in the PHP JWT Library's PBES2AESKW::unwrapKey() function, which reads the PBKDF2 iteration count (p2c) directly from the JOSE header without an upper bound, only validating that it is a positive integer. An attacker can craft a JWE with a very large p2c value, causing the server to spend excessive CPU time computing PBKDF2 before failing the unwrap operation. This leads to an uncontrolled resource consumption (CWE-400) denial of service. The issue affects any application registering PBES2-HS*+A*KW algorithms in their decryption AlgorithmManager. The patch introduces a default maximum iteration count of 1,000,000, configurable via the constructor, to limit CPU usage.

Potential Impact

An unauthenticated attacker can cause a denial of service by forcing the server to perform expensive PBKDF2 computations with an unbounded iteration count, consuming excessive CPU resources. This can degrade or disrupt service availability. The decryption process swallows exceptions, so the attacker incurs minimal cost while amplifying CPU usage on the server. The impact is limited to denial of service via CPU exhaustion; no direct data compromise or privilege escalation is indicated.

Mitigation Recommendations

A patch is available that enforces a configurable maximum iteration count (default 1,000,000) in the PBES2AESKW::unwrapKey() method before any PBKDF2 computation. Operators should upgrade to a fixed version to mitigate the vulnerability. Before upgrading, as a workaround, validate or limit the p2c header parameter with a custom header checker or disable PBES2 algorithms for untrusted tokens. Do not rely on the default unbounded iteration count.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-3prj-6hqw-cm82
Osv Schema Version
1.4.0
Aliases
[]
Ecosystems
["Packagist"]
Database Specific Severity
HIGH
Cvss Version
4.0

Threat ID: 6a58b41668715ace43d6858d

Added to database: 07/16/2026, 10:36:06 UTC

Last enriched: 07/16/2026, 10:57:56 UTC

Last updated: 07/31/2026, 12:27:30 UTC

Views: 9

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses