CVE-2026-128846: @fastify/busboy vulnerable to multipart file/field type confusion via chunk-dependent header parsing
@fastify/busboy is a streaming parser for multipart form data used by Fastify. In versions 3.2.1 through 3.2.5, the parser can interpret the same multipart bytes differently depending on how they are split across socket reads: when the sequence that terminates a part's header block arrives split exactly at the configured header size limit, an off by one error drops the final header line, so a part declared as a binary file attachment is emitted as an ordinary text field instead of a file. A remote client controls both the multipart body and the header padding needed to reach the boundary and can influence segmentation, so an application that applies upload validation such as malware scanning or extension checks only to file events while trusting plain field values may process the payload through the wrong path. The parser level type confusion is fully reproducible, while the downstream validation bypass depends on the application. The issue is fixed in @fastify/busboy 3.2.6, which tracks how many terminator bytes were actually buffered when the limit is reached so a split terminator no longer corrupts the final header, and users should upgrade to 3.2.6 or later. As a workaround, apply the same validation to field values as to file uploads rather than treating file events as a trust boundary.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
@fastify/busboyto a version that resolves this vulnerability.Fixed in 3.2.6 - Compensating control
Apply the same validation to multipart field values as to file uploads; do not treat file events as a trust boundary.
Event History
Frequently Asked Questions
Which deployments are affected?
Applications using @fastify/busboy versions 3.2.1 through 3.2.5 are affected at the parser level. A security impact requires an application to validate uploads only when they are emitted as file events while treating ordinary text fields as trusted or subject to weaker processing.
What must an attacker do to trigger the issue?
A remote client must submit a crafted multipart body with header padding that places the part-header terminator exactly at the configured header-size limit and causes that terminator to be split across socket reads. No privileges or user interaction are required, but the attack depends on controlling the multipart body and influencing its segmentation.
What is the practical impact on upload handling?
A part declared as a binary file attachment can be emitted as a text field instead of a file. This can bypass downstream controls such as malware scanning or extension checks if those controls run only for file events.
How can the issue be remediated?
Upgrade @fastify/busboy to version 3.2.6 or later. The fixed version correctly tracks buffered terminator bytes when the header limit is reached, preventing corruption of the final header line.