Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. web-token/jwt-library
  4. ›
  5. GHSA-6vvh-pxr4-25r7

GHSA-6vvh-pxr4-25r7: PHP JWT Framework: Chacha20Poly1305 key-encryption algorithm discards the Poly1305 authentication tag, performing no authentication on decryption

June 18, 2026

The experimental Chacha20Poly1305 key-encryption algorithm generates the 16-byte Poly1305 authentication tag during encryptKey() but discards it: the tag is never written to the header and therefore never reaches the wire. On the receiving side, decryptKey() calls openssl_decrypt('chacha20-poly1305', ...) without the tag argument, which makes OpenSSL skip authentication entirely.

As a result the AEAD construction is silently degraded to unauthenticated ChaCha20: a tampered encrypted CEK is accepted, and because ChaCha20 is a stream cipher, a single-byte change in the ciphertext propagates as a single-byte change in the recovered CEK with no integrity check (CWE-353 / CWE-347). An attacker on the token path can manipulate the wrapped key without detection.

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/web-token/jwt-library/GHSA-6vvh-pxr4-25r7.yaml
  • github.com/advisories/GHSA-6vvh-pxr4-25r7
  • github.com/web-token/jwt-framework/security/advisories/GHSA-6vvh-pxr4-25r7

Code Behaviors & Features

Detect and mitigate GHSA-6vvh-pxr4-25r7 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.4.10, all versions starting from 4.0.0 before 4.0.7, all versions starting from 4.1.0 before 4.1.7

Fixed versions

  • 3.4.10
  • 4.0.7
  • 4.1.7

Solution

Upgrade to versions 3.4.10, 4.0.7, 4.1.7 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-347: Improper Verification of Cryptographic Signature
  • CWE-353: Missing Support for Integrity Check

Source file

packagist/web-token/jwt-library/GHSA-6vvh-pxr4-25r7.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:24:13 +0000.