CVE-2026-35213: hapijs @hapi/content ReDoS in HTTP header parsing

CVE-2026-35213 · Severity: high · CVSS 7.5 · Published 2026-04-06

@hapi/content is a utility library used by the Hapi web framework to process HTTP headers. A vulnerability in how it handles specific headers allows an attacker to crash or freeze the server by sending a single, specially crafted web request. This results in a denial-of-service (DoS) condition, making the application unavailable to legitimate users.

Technologies: Hapi Content, @hapi/content (npm). Vendors: Hapi, npm.

Quick answers

Is CVE-2026-35213 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-35213 being exploited in the wild.
How severe is CVE-2026-35213?
High severity, with a CVSS score of 7.5, published 6 April 2026.
Which products and versions are affected?
Hapi Content <= 6.0.0; @hapi/content (npm) <= 6.0.0, SEMVER:introduced=0,fixed=6.0.1.
Is there a fix for CVE-2026-35213?
Yes. @hapi/content (npm): upgrade to 6.0.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-35213 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-35213?
Check whether you run Hapi Content or @hapi/content (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

  • @hapi/content (npm): upgrade to 6.0.1 or later
    npm install @hapi/content@6.0.1

Technical details

The @hapi/content library contains three regular expressions used for parsing 'Content-Type' and 'Content-Disposition' headers that are susceptible to catastrophic backtracking (CWE-1333). An unauthenticated remote attacker can exploit this by sending a crafted HTTP request containing a malicious header value. Because Node.js is single-threaded, the resulting CPU exhaustion causes the event loop to block, leading to a complete process hang or denial of service. The issue is resolved in version 6.0.1 by tightening the regex patterns to eliminate inefficient backtracking.

Affected products

  • hapijs content <= 6.0.0

Identifiers

  • CVE-2026-35213
  • GHSA-jg4p-7fhp-p32p

Timeline

  • 2026-04-02: patched: Fix merged in pull request #38 and version 6.0.1 released
  • 2026-04-02: advisory: GitHub Security Advisory GHSA-jg4p-7fhp-p32p published
  • 2026-04-06: disclosed: CVE-2026-35213 published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.