CVE-2026-119202

@hapi/content: quadratic-time parsing of Content-Disposition parameters allows denial of service

Published Oct 29, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
@hapi/content provides HTTP Content-* header parsing. From 3.0.6 until 6.0.3, Content.disposition() uses an unanchored parameter-name expression in a global regular-expression scan, causing repeated failed matching over the remaining input when a Content-Disposition parameter contains a long token without an equals sign. The resulting quadratic processing can block the Node.js event loop before route handlers or validation when @hapi/pez parses multipart/form-data headers, including unauthenticated hapi routes with payload.multipart enabled, and also affects applications that pass untrusted headers directly to Content.disposition(). This issue is fixed in @hapi/content version 6.0.3.

Analysis

AI-generated

Technical impact

The vulnerability arises from quadratic processing during the parsing of the Content-Disposition header when a parameter token lacks an equals sign. This causes repeated failed regex matches, which can stall the Node.js event loop and result in denial of service for any request processing that uses @hapi/pez to handle multipart/form-data or any application that directly calls Content.disposition with untrusted headers. The weakness is documented as CWE-1333, indicating a flaw in algorithmic complexity.

Affected Systems

Affected packages include the hapi/content library, versions 3.0.6 through 6.0.3, used by the hapi framework and its dependencies. These versions are associated with the hapijs organization on GitHub, and the vulnerability is resolved in release 6.0.3. Any Node.js application that imports @hapi/content and processes HTTP Content-* headers, especially through @hapi/pez multipart handling, is impacted.

Risk and Exploitability

The CVSS score of 7.5 places this issue in the high severity range. No EPSS score is available, but because the vulnerability can be triggered by crafted HTTP requests, remote attackers could potentially invoke the denial of service. The vulnerability is not listed in the CISA KEV catalog, indicating no current known exploit drives. Attack vectors likely involve sending a malicious Content-Disposition header on a public route, which then stalls the event loop while the library attempts to parse it. The lack of a direct code execution or data exfiltration path limits the scope to availability degradation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade @hapi/content to version 6.0.3 or later, which removes the buggy global regex and fixes the quadratic scan.
  • If an upgrade is not immediately possible, validate or sanitize incoming Content-Disposition headers before passing them to Content.disposition, ensuring that each parameter token contains an equals sign and is of reasonable length.
  • Disable multipart payload processing on routes that do not require it, and configure @hapi/pez so that only authenticated or trusted paths enable payload.multipart.

Generated by OpenCVE AI on October 29, 2026 at 21:30 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-8494-f6mr-cjpv @hapi/content: quadratic-time parsing of Content-Disposition parameters allows denial of service
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Hapijs
Hapijs content
Vendors & Products Hapijs
Hapijs content
Type Values Removed Values Added
Description @hapi/content provides HTTP Content-* header parsing. From 3.0.6 until 6.0.3, Content.disposition() uses an unanchored parameter-name expression in a global regular-expression scan, causing repeated failed matching over the remaining input when a Content-Disposition parameter contains a long token without an equals sign. The resulting quadratic processing can block the Node.js event loop before route handlers or validation when @hapi/pez parses multipart/form-data headers, including unauthenticated hapi routes with payload.multipart enabled, and also affects applications that pass untrusted headers directly to Content.disposition(). This issue is fixed in @hapi/content version 6.0.3.
Title @hapi/content: quadratic-time parsing of Content-Disposition parameters allows denial of service
Weaknesses CWE-1333
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 3, 2026, 4:38 PM
Reserved
Oct 29, 2026, 4:04 PM
Status
Deferred
Published
Oct 29, 2026, 9:17 PM
Modified
Nov 3, 2026, 5:18 PM