Junglewise Threat Intelligence

web-token PHP JWT Library padding oracle in RSA1_5 decryption

Severity: medium · CVSS 6.3 · Published 2026-06-18

Technologies: Web-Token JWT Library, Web-Token JWT Framework. Vendors: Web-Token.

Executive brief

A vulnerability exists in a popular PHP library used for handling JSON Web Tokens (JWT). The library's implementation of a specific encryption method (RSA1_5) allows an attacker to potentially recover encrypted keys by measuring small differences in how long the server takes to respond to different requests. This could lead to the unauthorized decryption of sensitive data protected by the library.

Technical details

The vulnerability is a timing side-channel (CWE-208) in the `RSACrypt::decryptWithRSA15()` method. The implementation fails to use implicit rejection as required by RFC 3447/8017; instead, it throws an exception immediately upon detecting malformed padding. This allows a remote attacker to perform a Bleichenbacher-style padding oracle attack by submitting adaptively crafted ciphertexts and measuring the time taken for the server to respond. By distinguishing between padding errors and subsequent processing errors, an attacker can eventually recover the wrapped Content Encryption Key (CEK). Patches have been released in versions 3.4.10, 4.0.7, and 4.1.7 which implement constant-time implicit rejection.

Affected products

  • web-token jwt-library < 3.4.10, >= 4.0.0 < 4.0.7, >= 4.1.0 < 4.1.7
  • web-token jwt-framework <= 4.1.6

Timeline

  • 2026-06-06: disclosed
  • 2026-06-18: advisory

References

Related threats