Automated Threat Modeling

Overview of CVE-2026-128835: @fastify/busboy Unterminated Multipart Header Hang and Denial of Service, with Patch Analysis

CVE-2026-128835 is a denial of service in @fastify/busboy where a multipart part with an unterminated header block leaves the parser and request handler hanging. This post summarizes the issue and reviews the fix shipped in version 3.2.6.

CVE Analysis

7 min read

Gaurav Sarraf
Gaurav Sarraf

2026-11-16

Overview of CVE-2026-128835: @fastify/busboy Unterminated Multipart Header Hang and Denial of Service, with Patch Analysis

Introduction

A malformed multipart body of roughly 100 bytes is enough to leave a Node.js request handler waiting indefinitely in applications that parse uploads with @fastify/busboy. Because @fastify/multipart does not release that handler when the client disconnects, an unauthenticated client can repeat the request and accumulate held files, database connections and concurrency slots until the process is restarted.

@fastify/busboy is a Node.js module for parsing incoming HTML form data and is the officially supported Fastify fork of the original Busboy library. Fastify is an OpenJS Foundation project, and an OpenJS Foundation blog post reported 7.8 million downloads in August 2024, 285 releases and 296 officially recognized plugins (dated, project-reported figures rather than market share data). The parser is also reached from outside Fastify. The CVE record states that the formData methods of undici versions 5.25.3 through 6.7.0 use the same code.

CVE-2026-128835 is rated 7.5 (High) under CVSS 3.1 and classified as CWE-400, uncontrolled resource consumption. It is fixed in @fastify/busboy 3.2.6.

Technical information

Root cause: an outstanding part counter that never drains

The Dicer parser vendored inside busboy tracks how many parts it has opened but not yet finished in a counter, this._parts. Each time Dicer matches a boundary, _oninfo() increments that counter for the part that just closed and attaches a one-time 'end' listener that decrements it. Dicer emits its own finish event only when the counter returns to zero.

That design assumes every counted part will eventually be consumed. Busboy, however, only starts reading a part after Dicer's HeaderParser emits 'header', and that event requires the blank line (CRLFCRLF) that terminates the header block. When the next boundary arrives before that blank line:

  • the part never emits 'header'
  • nothing ever reads the part's stream, so its 'end' event never fires
  • _parts stays above zero, so Dicer emits neither finish nor error

Dicer already handled one related case. It skipped counting empty parts, where start === end. A part whose header block was cut off by a boundary never got the same treatment, so it was counted as outstanding forever.

Attack flow

Based on the advisory and CVE record, exploitation follows this sequence:

  1. An unauthenticated client sends a multipart request to an endpoint whose body is parsed by a vulnerable @fastify/busboy (for example through @fastify/multipart, or through undici formData methods in the affected range).
  2. The body contains a part whose header block is not terminated with CRLFCRLF before the next boundary. The advisory notes a request of roughly 100 bytes is sufficient.
  3. On the boundary match, Dicer counts the part as outstanding and waits for an 'end' event that cannot arrive, because busboy never begins consuming a part that did not emit 'header'.
  4. The parser emits neither finish nor error, and the request handler stalls.
  5. With @fastify/multipart, the hung handler is not released when the client disconnects. Repeating the request accumulates stuck handlers and whatever they hold, such as open files, database connections and concurrency slots, until the process is restarted.

The CVSS vector records network attack vector, low attack complexity, no privileges and no user interaction, with no confidentiality or integrity impact and high availability impact. The advisory, CVE record and NVD entry we reviewed do not report exploitation in the wild or attribute activity to any threat actor.

Patch information

The fix ships in @fastify/busboy 3.2.6, released on November 16, 2026. The maintainers' advisory (GHSA-pvmq-3jr9-v5qh) lists versions below 3.2.6 as vulnerable and 3.2.6 as patched. The v3.2.5...v3.2.6 comparison shows both fix commits in the tagged release.

Core change: do not count parts with incomplete headers

The main change is commit 6a511e9 by Matteo Collina, titled "fix: finish when a delimiter cuts off a part's header block", in deps/dicer/lib/Dicer.js:

@@ -176,7 +176,10 @@ Dicer.prototype._oninfo = function (isMatch, data, start, end) { if (isMatch) { this._hparser.reset() if (this._isPreamble) { this._isPreamble = false } else { - if (start !== end) { + // A part whose header block is still incomplete never emits 'header', + // so nothing will consume it and its 'end' would never fire. Do not + // count it as outstanding, just like an empty part. + if (start !== end && !this._inHeader) { ++this._parts this._part.on('end', function () { if (--self._parts === 0) {

this._inHeader is Dicer's own flag indicating that bytes are still being routed to the header parser. If a boundary arrives while that flag is set, the header block never finished. Adding !this._inHeader to the condition makes such a part behave like an empty one. It is not counted and receives no 'end' listener, so the counter can reach zero and finish fires normally. Parts whose headers did complete are counted exactly as before, so busboy still waits for a real file stream to drain before finishing. Only the stuck case changes.

Follow-up: resetting header limits between parts

Once truncated parts were skipped rather than hanging, a second problem appeared. HeaderParser.reset(), which runs on every boundary match, cleared the buffer but not the size and pair counters (nread, npairs, maxed). An oversized truncated header could leave the parser marked as maxed, causing the next part's headers to be silently discarded. Commit df48e8d in deps/dicer/lib/HeaderParser.js resets those counters:

HeaderParser.prototype.reset = function () { this.finished = false + // A delimiter can cut off an incomplete header block; do not let its size + // and pair counts carry over into the next part's header block. + this.nread = this.npairs = 0 + this.maxed = false this.buffer = '' this.header = Object.create(null) this.tail = '' + this.dropped = 0 }

This snippet comes from the combined release diff. The dropped field was added by a separate 3.2.6 commit (00b74b1) that handles a split header terminator at the headerSize limit.

Regression tests

The release adds a regression test file that starts a 1-second timer and fails if neither finish nor error fires, which is exactly the hang. It covers four multipart bodies:

  • an unterminated header block followed by the closing delimiter, after a valid part
  • the same construction as the only part in the body
  • a boundary immediately after a valid header terminator
  • an unterminated header block followed by a boundary that is not the closing delimiter

Each body is parsed in one piece and then split into two chunks at every possible byte offset, so chunk boundaries cannot mask the bug. In every case the truncated part is expected to be dropped silently, valid fields are still emitted, and finish fires. Two more tests confirm that a truncated header does not consume the next part's headerSize/headerPairs limits, and that a file part with complete headers is still fully drained ('file end') before 'finish', so the fix does not end parsing early.

Other hardening in 3.2.6

The same release includes commits that are not part of this CVE's fix but arrive with the upgrade:

  • f86488e: urlencoded fieldSize and fieldNameSize checks now use >= instead of strict equality, because a malformed percent escape can push the decoded length past the limit.
  • 00b74b1: correct removal of a split CRLFCRLF terminator at the headerSize limit.
  • a5eace6: skipped parts receive an empty 'error' listener, so a body that ends early inside a skipped part cannot crash the process. The test comment links this to GHSA-5cw9-rrw8-9qhm.

Workaround when upgrading is not immediately possible

The advisory recommends configuring Fastify's handlerTimeout, which is disabled by default. With it set, hung handlers are eventually terminated and their resources released. This contains the resource leak but does not correct the parser behavior, so treat it as a stopgap until 3.2.6 is deployed.

Affected systems and versions

  • @fastify/busboy: versions 1.0.0 through 3.2.5 are affected. Fixed in 3.2.6 and later.
  • @fastify/multipart: reaches the vulnerable parser. In this path, a client disconnect does not release the hung handler, so resources leak until restart.
  • undici formData methods: versions 5.25.3 through 6.7.0 reach the same parser. The official undici release and advisory pages we reviewed do not identify a fixed undici version, so we cannot name one, and upgrading @fastify/busboy alone should not be assumed to fix a separate undici installation.

Exposure depends on whether multipart parsing actually reaches the vulnerable parser, directly or as a transitive dependency. The sources do not establish that every Fastify or Node.js deployment is affected regardless of dependency and code path.

Vendor security history

The fastify/busboy security advisory list shows three earlier parser issues published in August 2026:

  • denial of service through an oversized multipart boundary
  • denial of service through a prototype named multipart part header
  • CRLF injection through the disposition header values of multipart parts

With this CVE, that makes a cluster of multipart parser advisories for the project in 2026. On its own, this list is not a comprehensive security rating of Fastify or its maintainers.

References

Detect & fix
what others miss

Works with
  • GitHub
  • GitLab
  • Bitbucket
  • Azure DevOps Services
  • Gerrit
  • CVS
  • Jira
  • Linear
  • Slack
  • Security Compass
Explore integrations
Security magnifying glass visualization