jjwt v0.11.3 Release Notes

  • ๐Ÿš€ This patch release adds security guards against an ECDSA bug in Java SE versions 15-15.0.6, 17-17.0.2, and 18 (CVE-2022-21449). Note: if your application does not use these JVM versions, you are not exposed to the JVM vulnerability.

    Note that the CVE is not a bug within JJWT itself - it is a bug within the above listed JVM versions. However, even ๐Ÿ”’ with these additional JJWT security guards, the root cause of the issue is the JVM, so it strongly โฌ†๏ธ recommended to upgrade your JVM to version 15.0.7, 17.0.3, or 18.0.1 or later to ensure the bug does not surface elsewhere in your application code or any other third party library in your application that may not contain similar ๐Ÿ”’ security guards.

    Issues included in this patch are listed in the JJWT 0.11.3 milestone.

    โš  Backwards Compatibility Warning

    In addition to additional protections against r or s values of zero in ECDSA signatures, this ๐Ÿš€ release also disables by default legacy DER-encoded signatures that might be included in an ECDSA-signed JWT. ๐Ÿ‘ (DER-encoded signatures are not supported by the JWT RFC specifications, so they are not frequently encountered.)

    However, if you are using an application that needs to consume such legacy JWTs (either produced by a very early version of JJWT, or a different JWT library), you may re-enable DER-encoded ECDSA signatures by setting the io.jsonwebtoken.impl.crypto.EllipticCurveSignatureValidator.derEncodingSupported System property to the exact String value true. For example:

    System.setProperty("io.jsonwebtoken.impl.crypto.EllipticCurveSignatureValidator.derEncodingSupported", "true");
    

    BUT BE CAREFUL: DO NOT set this System property if your application may run on one of the vulnerable JVMs noted above (Java SE versions 15-15.0.6, 17-17.0.2, and 18).

    You may safely set this property to a String value of true on all other versions of the JVM if you need to support these legacy JWTs, otherwise it is best to ignore (not set) the property entirely.

    Credits

    ๐Ÿ”’ Thank you to Neil Madden, the security researcher that first discovered the JVM vulnerability as covered in his Psychic Signatures in Java blog post.

    ๐Ÿ”’ We'd also like to thank Toshiki Sasazaki, a member of LINE Corporation's Application Security โœ… Team as the first person to report the concern directly to the JJWT team, as well as for working with us during testing ๐Ÿš€ leading to our conclusions and subsequent 0.11.3 patch release.