CVE-2021-29443

Padding Oracle Attack due to Observable Timing Discrepancy in jose

MEDIUM
5.9
CVSS Score
Published: April 16, 2021 at 05:35 PM UTC
Updated: June 22, 2026 at 03:10 AM UTC
1 product affected across 1 vendorJose

Using jose by panva?

Get instant alerts when new vulnerabilities affect jose - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.9
Exploit prediction
EPSS 1%

Description

jose is an npm library providing a number of cryptographic operations. In vulnerable versions 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. 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). 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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.28.1v < 2.0.5v < 3.11.41.0.0 ≤ v < 1.28.12.0.0 ≤ v < 2.0.53.0.0 ≤ v < 3.11.4
Affected range stops below 1.28.1, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.0.5, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.11.4, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

x_refsource_MISCThird Party Advisory
https://www.npmjs.com/package/jose

CVSS

5.9MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
HIGH
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-203

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card