All vulnerabilities

npm

CVE-2026-119202

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

Severity
High 7.5
Published
30 Oct 2026
Last changed
30 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
6.0.3
Exploit chance
0.4% in the next 30 daysHigher than 35% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Regular expression denial of service (ReDoS) (CWE-1333)
Attack
Over the network · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Also known as
GHSA-8494-f6mr-cjpv
Sources
OSV.dev and GitHub

Description

Content.disposition() takes quadratic time when a Content-Disposition parameter contains a long token without =. One unauthenticated multipart request can block the Node.js event loop for several minutes.

Content.disposition() reads the parameters with a global regular expression in String.prototype.replace():

The parameter name part ([^\=*\s]+) has no anchor. When a run of name characters has no = after it, the match attempt reads the full run and fails. The global scan then starts again at the next character and reads the remaining run again. The total time is proportional to the square of the run length.

@hapi/pez calls Content.disposition() on the header of every part in a multipart/form-data body. In hapi, this occurs on each route with payload.multipart enabled, before the route handler and before any validation. The only size limit is the route payload.maxBytes, which is 1 MB by default.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
@hapi/contentnpm · osv:npm:@hapi/content
  • Every version before 6.0.3
contentnpm · osv:npm:content
  • From 3.0.6 up to 4.0.6

About @hapi/content

Weekly downloads (npm)
2,163,689npm, 23 Nov 2026

This is the only vulnerability in @hapi/content in our list.

About content

Weekly downloads (npm)
64,677npm, 23 Nov 2026

This is the only vulnerability in content in our list.

References