# CVE-2024-28176: jose resource exhaustion via compressed JWE plaintext

Source: https://junglewise.ai/threats/cve-2024-28176-jose-resource-exhaustion-via-compressed-jwe-plaintext  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-03-07. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2024-28176 · Severity: low · CVSS 3.1 · Published 2024-03-07

jose is a JavaScript library for handling JSON Web Encryption (JWE), used to secure data in transit and at rest. A flaw in JWE decompression allows attackers to craft specially compressed tokens that bypass application-level size limits, causing excessive CPU and memory consumption on vulnerable servers that decrypt untrusted JWE tokens. This can degrade service availability or trigger denial-of-service conditions.

Technologies: [jose-node-cjs-runtime (npm)](https://junglewise.ai/threats/technologies/jose-node-cjs-runtime), [jose-node-esm-runtime (npm)](https://junglewise.ai/threats/technologies/jose-node-esm-runtime). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

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

**How severe is CVE-2024-28176?** Low severity, with a CVSS score of 3.1, published 7 March 2024.

**Which products and versions are affected?** jose-node-cjs-runtime (npm) SEMVER:introduced=0,fixed=4.15.5; jose-node-esm-runtime (npm) SEMVER:introduced=0,fixed=4.15.5.

**Is there a fix for CVE-2024-28176?** Yes. jose-node-cjs-runtime (npm): upgrade to 4.15.5 or later; jose-node-esm-runtime (npm): upgrade to 4.15.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

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

**Am I affected by CVE-2024-28176?** Check whether you run jose-node-cjs-runtime (npm) or jose-node-esm-runtime (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-node-cjs-runtime (npm): upgrade to 4.15.5 or later

  ```sh
  npm install jose-node-cjs-runtime@4.15.5
  ```

- jose-node-esm-runtime (npm): upgrade to 4.15.5 or later

  ```sh
  npm install jose-node-esm-runtime@4.15.5
  ```


## Technical details

A resource exhaustion vulnerability exists in jose's JWE decryption logic when handling compressed plaintext. The vulnerability stems from improper bounds checking on the decompression routine: an attacker can craft a JWE token with a small compressed size but extremely high compression ratio that expands to consume unreasonable amounts of memory or CPU during decompression. Because the token size is determined by the compressed content, it can bypass application-level size validation, making secondary DoS protections ineffective. The attack requires network access to a Node.js application that decrypts untrusted JWE tokens. Patches v2.0.7 and v4.15.5 mitigate the issue by capping decompression output to 250 kB; v5.x removed JWE compression support entirely.

## Affected products

- panva jose 3.0.0 to 4.15.4
- panva jose-node-cjs-runtime all versions prior to 4.15.5
- panva jose-node-esm-runtime all versions prior to 4.15.5

## Identifiers

- CVE-2024-28176
- GHSA-hhhv-q57g-882q

## Timeline

- 2024-03-07: disclosed: GitHub Security Advisory GHSA-hhhv-q57g-882q published
- 2024-03-09: advisory: CVE-2024-28176 published by NVD
- 2024-03-07: patched: Patches released: jose v2.0.7, v4.15.5; jose-node-cjs-runtime v4.15.5; jose-node-esm-runtime v4.15.5

## References

- [https://github.com/panva/jose/security/advisories/GHSA-hhhv-q57g-882q](https://github.com/panva/jose/security/advisories/GHSA-hhhv-q57g-882q)

## 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)
- [jose-node-cjs-runtime padding oracle attack via timing discrepancy](https://junglewise.ai/threats/cve-2021-29446-jose-node-cjs-runtime-padding-oracle-attack-via-timing)
- [jose-node-esm-runtime padding oracle in AES-CBC-HMAC decryption](https://junglewise.ai/threats/cve-2021-29445-jose-node-esm-runtime-padding-oracle-in-aes-cbc-hmac-decryption)
