Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- High severity, with a CVSS score of 8.1, published 18 June 2026.
- Which products and versions are affected?
- Web-Token JWT Framework <= 4.2.99; Web-Token JWT Library < 3.4.10, >= 4.0.0 < 4.0.7, >= 4.1.0 < 4.1.7.
- Is there a fix for This vulnerability?
- No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether you run Web-Token JWT Framework or Web-Token JWT Library at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
The vulnerability exists in JWSVerifier::getAlgorithm() and JWEDecrypter.php due to the way PHP's spread operator and array_merge() handle duplicate keys. When merging protected and unprotected headers, the unprotected header values take precedence if they appear last in the merge operation. This creates a Time-of-Check/Time-of-Use (TOCTOU) flaw where the HeaderCheckerManager validates the 'alg' parameter from the protected header, but the Verifier/Decrypter uses the 'alg' (or 'enc') parameter from the unprotected header for the actual cryptographic operation. Attackers can exploit this to force algorithm downgrades or confusion, especially in environments using mixed key sets. Patches are available in versions 3.4.10, 4.0.7, and 4.1.7.
Affected products
- web-token jwt-framework <= 4.2.99
- web-token jwt-library < 3.4.10, >= 4.0.0 < 4.0.7, >= 4.1.0 < 4.1.7
Timeline
- 2026-06-06: disclosed
- 2026-06-18: advisory