Auth tag forgery vulnerability with AES-GCM encrypted JWT
Published: April 30, 2018
SECURITY IDENTIFIERS
- CVE: CVE-2018-1000539 (NVD)
- GHSA: GHSA-mj4x-wcxf-hm8x
- Vendor Advisory: https://github.com/nov/json-jwt/pull/62
GEM
SEVERITY
CVSS v3.x: 5.3 (Medium)
UNAFFECTED VERSIONS
< 0.5.1
PATCHED VERSIONS
>= 1.9.4
DESCRIPTION
Ruby's OpenSSL bindings do not check the length of the supplied authentication tag when decrypting an authenticated encryption mode such as AES-GCM, leaving this up to the authors of a gem/app to implement for properly validating the message.
json-jwt was not checking for the authentication tag length, meaning that with a one byte tag the JWT would be considered not tampered with. This means that with an average of 128 (max 256) attempts an attacker can forge a valid signature.
