Live data from Hacker News

Critical Vulnerabilities in JSON Web Token Libraries

auth0.com

51–55 of 55 posts

Re: Critical Vulnerabilities in JSON Web Token Libraries

#51

I've actually seen this same issue in JWT libs before (August 2014) as well. I think one of the main issue is JWT is simple to implement, the specification seems to be unclear about how to treat unsecure JWTs (with the `none` alg). From the specificaiton: Even if a JWT can be successfully validated, unless the algorithm(s) used in the JWT are acceptable to the application, it SHOULD reject the JWT. So what it is sayi…

You didn't read carefully enough.

Your site may well find both HMAC and RSA to be acceptable algorithms. However if you can be tricked into using HMAC to verify something actually signed with RSA, then anyone can forge content you accept as valid.

What is important is not that the algorithm is acceptable. It is that the algorithm you use for verification is the algorithm that actually should be used.

Re: Critical Vulnerabilities in JSON Web Token Libraries

#52
post #49
post #48

Earlier quoted context omitted.

Can you expand? JWT are a good way to remove state from the service and the HMAC lets you trust it. This looks like an implementation bug, which is unfortunate, but not a reason to avoid the technology.

I wrote 10 warning signs of bad crypto standards on Twitter a few minutes ago, largely inspired by JWT.

All points well taken. Still, people need to pack stuff into cookies. There are probably some modules for some environments that do this in unimpeachable fashion. How likely is the average developer to reliably pick those modules, or (haha) just code up the equivalent without using a module? At least a flawed consensus around JWT gets people looking at it.

So now what? The draft [0] hasn't expired yet, so it's possible they'll just rip out the public-key stuff. What should they add to answer your reservations about CTR+HMAC?

[0] http://self-issued.info/docs/draft-ietf-oauth-json-web-token...

Re: Critical Vulnerabilities in JSON Web Token Libraries

#54
post #49

Earlier quoted context omitted.

I wrote 10 warning signs of bad crypto standards on Twitter a few minutes ago, largely inspired by JWT.

All points well taken. Still, people need to pack stuff into cookies. There are probably some modules for some environments that do this in unimpeachable fashion. How likely is the average developer to reliably pick those modules, or (haha) just code up the equivalent without using a module? At least a flawed consensus around JWT gets people looking at it. So now what? The draft [0] hasn't expired yet, so it's possib…

Apparently the drafts have been sent to the editor so they can't be changed. [1] Oh well!

[1] http://self-issued.info/?p=1323

Re: Critical Vulnerabilities in JSON Web Token Libraries

#55

If you love to confirm your stereotypes as much as the next guy, take a closer look at the languages: - Ruby, Java, Lua, Scala and .NET are unaffected - updates are available for Node.js and Python - there are still no fixed version for JavaScript and PHP libs

The JavaScript version has additional crypto related vulnerabilities, by the way :-)
Post reply on HN