# CVE-2021-29443: jose AES-CBC-HMAC padding oracle via timing discrepancy

Source: https://junglewise.ai/threats/cve-2021-29443-jose-aes-cbc-hmac-padding-oracle-via-timing-discrepancy  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-04-19. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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

jose is a widely-used JavaScript library for cryptographic operations including JWE (JSON Web Encryption) decryption. A timing-based side-channel vulnerability allows attackers to decrypt confidential data protected by AES-CBC-HMAC algorithms without knowing the encryption key. By observing minute differences in how long decryption failures take, attackers can statistically infer the plaintext one byte at a time, potentially exposing sensitive authentication tokens or encrypted messages.

Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2021-29443 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-29443 being exploited in the wild.

**How severe is CVE-2021-29443?** Low severity, with a CVSS score of 3.1, published 19 April 2021.

**Which products and versions are affected?** jose (npm) SEMVER:introduced=1.0.0,fixed=1.28.1.

**Is there a fix for CVE-2021-29443?** Yes. jose (npm): upgrade to 1.28.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2021-29443 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2021-29443?** Check whether you run jose (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 (npm): upgrade to 1.28.1 or later

  ```sh
  npm install jose@1.28.1
  ```


## Technical details

The vulnerability is a classic padding oracle attack enabled by an observable timing discrepancy (CWE-208, CWE-696). When decrypting AES_CBC_HMAC_SHA2 ciphertexts (A128CBC-HS256, A192CBC-HS384, A256CBC-HS512), the library performed both HMAC tag verification and CBC decryption before throwing JWEDecryptionFailed, but timing differences between HMAC failures and padding errors were observable to an attacker. No authentication is required—the attacker only needs network access to a service using vulnerable versions. An adversary can issue repeated decryption requests and measure response times to build a padding oracle, enabling decryption of arbitrary JWE payloads with ~128*b calls per ciphertext block. The fix verifies the HMAC tag before performing CBC decryption, eliminating the timing side-channel. Patched versions are ^1.28.1, ^2.0.5, and >=3.11.4.

## Affected products

- panva jose <1.28.1 || >=2.0.0 and <2.0.5 || >=3.0.0 and <3.11.4

## Identifiers

- CVE-2021-29443
- GHSA-58f5-hfqc-jgch

## Timeline

- 2021-04-15: disclosed: GitHub security advisory published
- 2021-04-15: patched: Patches released: v1.28.1, v2.0.5, v3.11.4

## References

- [https://github.com/panva/jose/security/advisories/GHSA-58f5-hfqc-jgch](https://github.com/panva/jose/security/advisories/GHSA-58f5-hfqc-jgch)
- [https://www.npmjs.com/package/jose](https://www.npmjs.com/package/jose)

## Related threats

- [JOSE JWE resource exhaustion via high PBKDF2 iteration count](https://junglewise.ai/threats/cve-2022-36083-jose-jwe-resource-exhaustion-via-high-pbkdf2-iteration-count)
