Junglewise Threat Intelligence

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

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

Technologies: Panva Jose, jose-node-esm-runtime (npm), Panva Jose-Node-Cjs-Runtime. Vendors: npm.

Executive brief

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.

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

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

Related threats