Vulnerability · Published Apr 16, 2021 · Assigned by GitHub_M
CVE-2021-29445Padding Oracle Attack due to Observable Timing Discrepancy in jose-node-esm-runtime
Medium 5.9
In plain English
A medium-severity security flaw in jose-node-esm-runtime from panva. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 65% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
jose-node-esm-runtime is an npm package which provides a number of cryptographic functions. In versions prior to 3.11.4 the AES_CBC_HMAC_SHA2 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. But 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 128*b calls to the padding oracle (where b is the number of bytes in the ciphertext block). A patch was released which ensures the HMAC tag is verified before performing CBC decryption. The fixed versions are `>=3.11.4`. Users should upgrade to `^3.11.4`.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | jose-node-esm-runtime | 3.11.4 | GHSA-4v4g-726h-xvfv |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| panva | jose-node-esm-runtime | < 3.11.4 |
Weakness: CWE-203 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
References
- https://github.com/panva/jose/security/advisories/GHSA-4v4g-726h-xvfv x_refsource_CONFIRM
- https://www.npmjs.com/package/jose-node-esm-runtime x_refsource_MISC