Back to list

PHP JWT Framework: JWSVerifier uses algorithm from unprotected header, enabling algorithm confusion attacks — GHSA-JC38-X7X8-2XC8

GitHub · GitHub · GHSA-JC38-X7X8-2XC8

ID
GHSA-JC38-X7X8-2XC8
Date
Activity
Source
GitHub
Vendor
GitHub
Threat
high
CVSS
8.1

Summary

## Summary `JWSVerifier::getAlgorithm()` in `src/Library/Signature/JWSVerifier.php` (line 144) merges protected and unprotected headers using PHP's spread operator: ```php $completeHeader = [...$signature->getProtectedHeader(), ...$signature->getHeader()]; ``` In PHP, when spreading arrays with duplicate string keys, the **last array's values take precedence**. Since the unprotected header (`getHeader()`) is spread…

Product

composer: web-token/jwt-framework | composer: web-token/jwt-library

What to do

General, cautious steps (verify details in the official source):

  • Prioritize patching or mitigation immediately (treat as actively risky).
  • Identify affected product versions in your inventory and verify whether you are impacted.
  • Apply vendor patches/updates or recommended mitigations as soon as available.
  • Read the official advisory for exact affected versions and remediation steps.

Official advisory

Related advisories