Critical Vulnerabilities in JSON Web Token Libraries
1–10 of 55 posts
Re: Critical Vulnerabilities in JSON Web Token Libraries
#2Where are the CVEs?! ... OK, I just sent a brief write-up to the oss-security list, we'll see what happens.
Re: Critical Vulnerabilities in JSON Web Token Libraries
#3http://www.thoughtcrime.org/blog/the-cryptographic-doom-prin...
Re: Critical Vulnerabilities in JSON Web Token Libraries
#4https://www.timmclean.net/2015/03/31/jwt-algorithm-confusion...
Re: Critical Vulnerabilities in JSON Web Token Libraries
#5My team has been using ruby-jwt, so I'm glad to see that at least does not seem to be on the list of vulnerable libraries.
Re: Critical Vulnerabilities in JSON Web Token Libraries
#6Be wary if you do anything with signed data before you verify the signature. http://www.thoughtcrime.org/blog/the-cryptographic-doom-prin...
But these "typical JWT lib api vulns" are WAY SIMPLER than Vaudenay etc. Any programmer could do this in minutes or less. WOW. It's so obvious and straightforward (in hindsight I suppose). My mouth is still hanging open.
Re: Critical Vulnerabilities in JSON Web Token Libraries
#7https://github.com/firebase/php-jwt/blob/master/Authenticati...
It's not in the methods array and the decode method specifically does a check to see if it's empty.
if (empty($header->alg)) { throw exception }
Can anyone throw some light on this?
Re: Critical Vulnerabilities in JSON Web Token Libraries
#8They list the php-jwt library from firebase as vulnerable but I can't see why. As far as I can see they do not support the None algorithm. https://github.com/firebase/php-jwt/blob/master/Authenticati... It's not in the methods array and the decode method specifically does a check to see if it's empty. if (empty($header->alg)) { throw exception } Can anyone throw some light on this?
As the original post describes, if your code expected to use a RSA public/private key pair, then it will pass the public key to decode(). Then an attacker can craft a JWT that claims to use a HMAC symmetric key and sign it with the public key, which is public. One and done.
(your code in that case expected the header to specify an RSA algorithm, and be signed with the private key. but the decode() function doesn't know that)
Re: Critical Vulnerabilities in JSON Web Token Libraries
#9They list the php-jwt library from firebase as vulnerable but I can't see why. As far as I can see they do not support the None algorithm. https://github.com/firebase/php-jwt/blob/master/Authenticati... It's not in the methods array and the decode method specifically does a check to see if it's empty. if (empty($header->alg)) { throw exception } Can anyone throw some light on this?
The second critical problem, which is not addressed by php-jwt, is that it does not take as a parameter to the decode() function which algorithm should be used. It figures out the algorithm by looking at the header. As the original post describes, if your code expected to use a RSA public/private key pair, then it will pass the public key to decode(). Then an attacker can craft a JWT that claims to use a HMAC symmetr…
Re: Critical Vulnerabilities in JSON Web Token Libraries
#10<3 OSS