CVE-2021-29443: Padding Oracle Attack due to Observable Timing Discrepancy in jose
jose is an npm library providing a number of cryptographic operations. In vulnerable versions AESCBCHMACSHA2 Algorithm (A128CBC-HS256, A192CBC-HS384, A256CBC-HS512) decryption would always execute both HMAC tag verification and CBC decryption, if either failed JWEDecryptionFailed would be thrown. A possibly observable difference in timing when padding error would occur while decrypting the ciphertext makes a padding oracle and an adversary might be able to make use of that oracle to decrypt data without knowing the decryption key by issuing on average 128b calls to the padding oracle (where b is the number of bytes in the ciphertext block). All major release versions have had a patch released which ensures the HMAC tag is verified before performing CBC decryption. The fixed versions are ^1.28.1 || ^2.0.5 || >=3.11.4. Users should upgrade their v1.x dependency to ^1.28.1, their v2.x dependency to ^2.0.5, and their v3.x dependency to ^3.11.4. Thanks to Jason from Microsoft Vulnerability Research (MSVR) for bringing this up and Eva Sarafianou (@esarafianou) for helping to score this advisory.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/joseto a version that resolves this vulnerability.Fixed in ^1.28.1 - Upgrade
Upgrade
npm/joseto a version that resolves this vulnerability.Fixed in ^2.0.5 - Upgrade
Upgrade
npm/joseto a version that resolves this vulnerability.Fixed in >=3.11.4
Event History
Frequently Asked Questions
What is the severity of CVE-2021-29443?
CVE-2021-29443 has a severity rating that indicates it poses significant security risks due to improper HMAC tag verification and CBC decryption.
How do I fix CVE-2021-29443?
To fix CVE-2021-29443, you should upgrade the 'jose' library to version 1.28.2 or later for version 1.x, or version 2.0.6 or later for version 2.x, or version 3.11.5 or later for version 3.x.
What software is affected by CVE-2021-29443?
CVE-2021-29443 affects all versions of the 'jose' library from version 1.0.0 to 1.28.1, version 2.0.0 to 2.0.5, and version 3.0.0 to 3.11.4.
What type of vulnerability is CVE-2021-29443?
CVE-2021-29443 is a cryptographic vulnerability that allows improper handling of HMAC tag verification in AES encryption.
Does CVE-2021-29443 affect node.js applications?
Yes, CVE-2021-29443 impacts node.js applications that utilize the affected versions of the 'jose' library.