CVE-2026-74866
JSON

5.8medium

@fastify/busboy vulnerable to CRLF injection via multipart Content-Disposition filename and name

Severity
5.8medium CVSS:3.1 by openjs
Exploit likelihood
0.19% (higher than 9% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
openjs
Also known as
GHSA-gxm5-99cw-xjw9

Description

@fastify/busboy is a multipart form-data parser for Node.js. Its multipart part-header parser splits header lines only on the two-byte carriage-return line-feed sequence, so a lone carriage return or line feed embedded in a part header is not treated as a line break and is carried verbatim into the parsed Content-Disposition filename and field name handed to the application. An attacker who uploads a file whose filename or field name contains a bare carriage return or line feed can inject control characters into consumers that trust the parser to return clean values, enabling filesystem filename pollution, log forging, or header injection when the value is forwarded to a carriage-return-sensitive sink. All versions of @fastify/busboy up to and including 3.2.1 are affected. The issue is fixed in version 3.2.2, which rejects any header line that still contains a bare carriage return or line feed. Users should upgrade to 3.2.2, and consumers such as @fastify/multipart should bump their @fastify/busboy dependency to pull in the fix.

Affected

Product or packageVersionsReported by
@fastify/busboy @fastify/busboybefore 3.2.2
Not affected: 3.2.2
CVE List
@fastify/busboy (npm)before 3.2.2GitHub Advisory Database
fastify fastify/busyboybefore 3.2.2NVD

All scores

openjs5.8medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N
GitHub5.8medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N

Classification

CWE-93

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

@fastify/busboy is a multipart form-data parser for Node.js. Its multipart part-header parser splits header lines only on the two-byte carriage-return line-feed sequence, so a lone carriage return or line feed embedded in a part header is not treated as a line break and is carried verbatim into the parsed Content-Disposition filename and field name handed to the application. An attacker who uploads a file whose filename or field name contains a bare carriage return or line feed can inject control characters into consumers that trust the parser to return clean values, enabling filesystem filename pollution, log forging, or header injection when the value is forwarded to a carriage-return-sensitive sink. All versions of @fastify/busboy up to and including 3.2.1 are affected. The issue is fixed in version 3.2.2, which rejects any header line that still contains a bare carriage return or line feed. Users should upgrade to 3.2.2, and consumers such as @fastify/multipart should bump their @fastify/busboy dependency to pull in the fix.

GitHub Advisory Database
Impact

@fastify/busboy 3.2.1 and earlier retains a bare carriage return or line feed inside the parsed Content-Disposition parameters returned to the application. The multipart header parser ends a header line only on the two-byte \r\n sequence, so a lone CR or LF embedded in a part header is carried verbatim into the filename and field name delivered by the file and field events. An application that forwards the supplied filename or name into a CR/LF-sensitive sink cannot anticipate the embedded control character.

An attacker who uploads a file whose filename or field name contains a bare CR or LF can pollute filenames on disk when the upload is saved under its original name, inject forged lines into logs, or inject headers on a downstream hop that does not re-validate CR/LF, such as object-storage metadata or a proxied backend. Applications using @fastify/busboy directly, or through @fastify/multipart and its consumers, are affected.

Patches

Upgrade to @fastify/busboy 3.2.2 or later.

Workarounds

Validate or strip carriage return and line feed characters from the filename and field name before using them in any filesystem, logging, or outbound-header context.

NVD (es)

@fastify/busboy es un analizador de datos de formulario multipart para Node.js. Su analizador de encabezados de parte multipart divide las líneas de encabezado solo en la secuencia de dos bytes de retorno de carro y salto de línea, por lo que un retorno de carro o salto de línea solitario incrustado en un encabezado de parte no se trata como un salto de línea y se transfiere textualmente al nombre de archivo y nombre de campo de Content-Disposition analizados entregados a la aplicación. Un atacante que carga un archivo cuyo nombre de archivo o nombre de campo contiene un retorno de carro o salto de línea simple puede inyectar caracteres de control en consumidores que confían en que el analizador devuelva valores limpios, lo que permite la contaminación de nombres de archivo del sistema de archivos, la falsificación de registros o la inyección de encabezados cuando el valor se reenvía a un sumidero sensible al retorno de carro. Todas las versiones de @fastify/busboy hasta la 3.2.1 inclusive están afectadas. El problema está solucionado en la versión 3.2.2, la cual rechaza cualquier línea de encabezado que aún contenga un retorno de carro o salto de línea simple. Los usuarios deben actualizar a la versión 3.2.2, y los consumidores, como @fastify/multipart, deben actualizar su dependencia de @fastify/busboy para incorporar la solución.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-74866 changed 2026-08-21CVE Terms of Use
GitHub Advisory DatabaseGHSA-gxm5-99cw-xjw9 changed 2026-10-05CC-BY-4.0
NVDCVE-2026-74866 changed 2026-10-16Public domain