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.

Severity (CVSS 3.1)5.9Medium
Exploit odds (30 days)1.1%top 35.1% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
npmjose-node-esm-runtime3.11.4GHSA-4v4g-726h-xvfv

Affected products (as reported)

VendorProductVersions
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