Skip to content

Comment on What I don't like about JSON Web Tokensparent

Comments

Thanks for spotting this Tim, I appreciate it. I've patched python-jwt and linked to your article. Please let me know if you file a CVE so I can link to it too.

The docs did say:

  returns: ``(header, claims)`` if the token was verified successfully. The token must pass the following tests:
  - Its signature must verify using the public key or its algorithm must be ``none``.
but passing the responsibility for checking header['alg'] to the caller was the wrong way round so thanks again!

Very good catch. You should file CVEs for these, since it's about as hair-on-fire bad as a security bug can be!

News at 5: Library for securing tokens doesn't secure tokens.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.