CVE-2026-134460: PHP JWT Framework: Chacha20Poly1305 key-encryption algorithm discards the Poly1305 authentication tag, performing no authentication on decryption

Published Jun 18, 2026
·
Updated

Impact

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 openssldecrypt('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.

Affected configurations

Applications that register Jose\Experimental\KeyEncryption\Chacha20Poly1305 (package web-token/jwt-experimental) as a JWE alg.

Patches

encryptKey() now publishes the Poly1305 tag as the base64url tag header parameter (and asserts it is 16 bytes). decryptKey() requires the tag header, validates its length, and passes it to openssldecrypt() so the tag is actually verified, in line with RFC 7539 / RFC 8439. Tampering now results in a decryption failure.

Note: this changes the wire format of tokens produced with this experimental algorithm (a tag header is now emitted and required).

Workarounds

Do not use the experimental Chacha20Poly1305 key-encryption algorithm for untrusted input until upgraded.

References

- RFC 7539 / RFC 8439 (ChaCha20-Poly1305 AEAD) - CWE-353: Missing Support for Integrity Check

Résolution

Un correctif a été préparé sur une branche dédiée basée sur 3.4.x, avec des tests anti-régression dédiés (fork privé temporaire de cette advisory, PR #1).

ChaCha20-Poly1305 — le tag d'authentification Poly1305 est désormais publié dans le header au chiffrement et vérifié au déchiffrement (RFC 7539), rétablissant l'intégrité AEAD.

Validation : php -l OK, PHPUnit vert, aucune nouvelle erreur PHPStan introduite (différentiel nul vs 3.4.x), aucun commentaire ajouté dans le code source. Après merge, cascade prévue 3.4.x → 4.0.x → 4.1.x.

Other sources

web-token jwt-framework 1.2.0 before 3.4.10, jwt-experimental before 3.4.10, 4.0.x before 4.0.7, and 4.1.x before 4.1.7 contain a missing integrity check in the experimental Chacha20Poly1305 key-encryption algorithm, which discards the Poly1305 tag in encryptKey() and calls openssldecrypt() without it in decryptKey(). Attackers on the token path can modify the encrypted content encryption key undetected.

— MITRE

Affected Software

6 affected componentsFixes available
composer/web-token/jwt-framework>=1.2.0<3.4.10
composer/web-token/jwt-experimental<3.4.10, >=4.0.0<4.0.7, >=4.1.0<4.1.7
composer/web-token/jwt-experimental<=4.1.6
composer/web-token/jwt-library<3.4.10
3.4.10
composer/web-token/jwt-library>=4.0.0<4.0.7
4.0.7
composer/web-token/jwt-library>=4.1.0<4.1.7
4.1.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/web-token/jwt-library to a version that resolves this vulnerability.

    Fixed in 3.4.10
  2. Upgrade

    Upgrade composer/web-token/jwt-library to a version that resolves this vulnerability.

    Fixed in 4.0.7
  3. Upgrade

    Upgrade composer/web-token/jwt-library to a version that resolves this vulnerability.

    Fixed in 4.1.7
  4. Upgrade

    Upgrade web-token/jwt-framework to a version that resolves this vulnerability.

    Fixed in 3.4.10
  5. Upgrade

    Upgrade web-token/jwt-framework to a version that resolves this vulnerability.

    Fixed in 4.0.7
  6. Upgrade

    Upgrade web-token/jwt-framework to a version that resolves this vulnerability.

    Fixed in 4.1.7
  7. Upgrade

    Upgrade web-token/jwt-experimental to a version that resolves this vulnerability.

    Fixed in 3.4.10
  8. Upgrade

    Upgrade web-token/jwt-experimental to a version that resolves this vulnerability.

    Fixed in 4.0.7
  9. Upgrade

    Upgrade web-token/jwt-experimental to a version that resolves this vulnerability.

    Fixed in 4.1.7
  10. Compensating control

    Do not use the experimental Chacha20Poly1305 key-encryption algorithm for untrusted input until upgraded.

Event History

Jun 18, 2026
Advisory Published
via OSV·09:08 PM
Data Sourced
via OSV·09:08 PM
DescriptionSeverityWeaknessAffected Software
Nov 21, 2026
CVE Published
via MITRE·04:32 PM
Data Sourced
via MITRE·04:32 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:17 PM
DescriptionSeverityWeakness

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203