The vulnerability is a ReDoS (regular expression denial of service, CWE-1333) in the @hapi/content package. The vulnerable code is in lib/index.js, specifically the exports.disposition function, which parses Content-Disposition headers.
The root cause is the global regular expression internals.contentDispositionParamRegex used inside exports.disposition via parameters.replace(...). The original regex was:
/([^\=\*\s]+)(\*)?\s*\=\s*(?:([^;'"\s]+\'[\w-]*\'[^;\s]+)|(?:\"([^"]*)\")|([^;\s]*))/g
The parameter-name capture group ([^\=\*\s]+) has no anchor. When a run of name characters is not followed by =, the match attempt reads the entire run and fails, then the global scan restarts at the next character and re-reads the remaining run. This yields quadratic (O(n²)) time proportional to the square of the run length, allowing an unauthenticated attacker to block the Node.js event loop for seconds to minutes with a single multipart request.
The fix (commit 0993851dc7234976a3fce3a7c31662b213c940fd) adds a trailing alternative |[^\=\*\s]+ to the regex so the full run of name characters is consumed in a single match when no = follows, and adds a guard if ($1 === undefined) { return; } in the replace callback to ignore that skipped match. This makes parsing linear.
The vulnerable function that would appear in a runtime profiler during exploitation is exports.disposition (the exported disposition function of the @hapi/content module). This is the function that processes the untrusted header and executes the vulnerable regex. In a Node.js profiler, this would appear as disposition (the module's exported function).