2023-01-09
JsonWebToken Secret Poisoning Vulnerability Has Been Patched
In December, Auth0 released an updated version of JsonWebToken open source library to address a remote code execution vulnerability. The flaw was detected by researchers at Palo Alto Networks Unit 42; they reported the issue to Auth0 in July. Users are urged to update to JsonWebToken version 9.0.0 or newer.
Editor's Note
Interesting vulnerability, in particular as the library is very popular. However, I don't see a clear way to exploit this vulnerability to gain the claimed code execution. There are quite a few dependencies to make this work. So, in other words: Not an emergency, but get this patched before someone more creative in exploit writing figures out a way to exploit this.
Johannes Ullrich
JsonWebToken is a open source Javascript package that allows you to verify/sign JWTs, which are mostly used for authorization/authentication. In that context, getting the crypto right is critical. Specific to CVE-2022-23529, lack of data validation of the data type for the secrretOrPublicKey input, which is fixed in version 9.0.0. Two actions here: first, update to the newer version; second, take this to your developers to underscore the importance of input validation (and yes, I've been the guy who incorrectly stated "they would never do that" about data passed to my app....)
Lee Neely
This is another example that calling something “cryptography-based” is easy, safely implementing cryptographic and key/secret management functions is NOT easy. This is especially true for efforts like JWT to implement using “URL-safe parts” in order to work in a browser/server through multiple firewalls path. Take special precautions anytime you are an early adopter of security approaches that claim to work in “constrained environments.”
John Pescatore
Not "patched!" There is a gap between the availability and the application of patches. While necessary, availability is only part of a solution.
William Hugh Murray
Read more in
Unit 42: Disclosing a New Vulnerability in JWT Secret Poisoning (CVE-2022-23529)
GitHub: jsonwebtoken has insecure input validation in jwt.verify function
NPMJS: jsonwebtoken
Dark Reading: JsonWebToken Security Bug Opens Servers to RCE
Bleeping Computer: Auth0 fixes RCE flaw in JsonWebToken library used by 22,000 projects