CVE-2021-29446: jose-node-cjs-runtime padding oracle attack via timing discrepancy

CVE-2021-29446 · Severity: low · CVSS 3.1 · Published 2021-04-19

jose-node-cjs-runtime is a cryptographic library used to handle encrypted JSON Web Encryption (JWE) tokens. A timing side-channel vulnerability in AES-CBC decryption allows attackers to extract encrypted data without the decryption key by repeatedly querying the library and observing how long it takes to fail, potentially compromising sensitive data protected by these tokens.

Technologies: jose-node-cjs-runtime (npm). Vendors: npm.

Quick answers

Is CVE-2021-29446 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2021-29446 being exploited in the wild.
How severe is CVE-2021-29446?
Low severity, with a CVSS score of 3.1, published 19 April 2021.
Which products and versions are affected?
jose-node-cjs-runtime (npm) SEMVER:introduced=0,fixed=3.11.4.
Is there a fix for CVE-2021-29446?
Yes. jose-node-cjs-runtime (npm): upgrade to 3.11.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2021-29446 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2021-29446?
Check whether you run jose-node-cjs-runtime (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • jose-node-cjs-runtime (npm): upgrade to 3.11.4 or later
    npm install jose-node-cjs-runtime@3.11.4

Technical details

The vulnerability is a padding oracle attack resulting from an observable timing discrepancy in AES_CBC_HMAC_SHA2 decryption (A128CBC-HS256, A192CBC-HS384, A256CBC-HS512 algorithms). The library performed both HMAC tag verification and CBC decryption in sequence, but padding errors during decryption caused measurably different timing compared to HMAC verification failures. An unauthenticated network-accessible attacker can exploit this to decrypt JWE tokens without the key by issuing approximately 128*b oracle queries (where b is the ciphertext block size in bytes). The fix ensures HMAC verification executes before CBC decryption, eliminating the timing side-channel. Patches are available in version 3.11.4 and later.

Affected products

  • panva jose-node-cjs-runtime <3.11.4

Identifiers

  • CVE-2021-29446
  • GHSA-rvcw-f68w-8h8h

Timeline

  • 2021-04-15: disclosed
  • 2021-04-16: patched: Version 3.11.4 and later

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.