REDHAT-BUG-2488480: CRLF Injection

Published Jun 12, 2026
·
Updated

form-data is a library for creating readable multipart/form-data streams. In versions through 4.0.5, the field argument to FormData#append and the filename option are concatenated verbatim into the Content-Disposition header without escaping carriage return (CR), line feed (LF), or double-quote (") characters. An application that passes attacker-controlled data as a field name or filename (for example, an API gateway that turns JSON object keys into multipart field names) allows the attacker to terminate the header line and inject additional headers, or to smuggle entire additional multipart parts, into the request the application forwards to a backend. This can let the attacker add or override form fields (e.g. set isadmin=true) seen by the downstream parser. This is an instance of CWE-93 (CRLF injection). The fix escapes CR, LF, and " as %0D, %0A, and %22 in field names and filenames, matching the serialization browsers use per the WHATWG HTML multipart/form-data encoding algorithm. Exploitation requires the consuming application to use untrusted input as a field name or filename; applications that use only fixed/trusted field names are not affected. Fixed in 2.5.6, 3.0.5, and 4.0.6.

Affected Software

3 affected components
npm/form-data<=4.0.5
npm/form-data>4.0.5<=4.0.6
npm/form-data>2.5.6<=3.0.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade form-data to a version that resolves this vulnerability.

    Fixed in 2.5.6
  2. Upgrade

    Upgrade form-data to a version that resolves this vulnerability.

    Fixed in 3.0.5
  3. Upgrade

    Upgrade form-data to a version that resolves this vulnerability.

    Fixed in 4.0.6
  4. Configuration

    Upgrade to a fixed form-data version so that the `field` argument to `FormData#append` and the `filename` option escape CR, LF, and `"` when generating the multipart `Content-Disposition` header (unfixed versions through 4.0.5 concatenate these values verbatim).

    form-data (FormData#append field / filename option) Escaping of field names and filenames in Content-Disposition = Escape CR as %0D, LF as %0A, and double-quote (") as %22 (rather than concatenating verbatim)
  5. Compensating control

    Ensure consuming applications do not pass untrusted input as a multipart form-data field name or filename; only use fixed/trusted field names and filenames when calling `FormData#append`. (This specific issue requires attacker-controlled values in those parameters.)

Event History

Jun 12, 2026
Data Sourced
via Red Hat·07:01 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2488480?

The severity of REDHAT-BUG-2488480 is high, rated at 7.

2

How do I fix REDHAT-BUG-2488480?

To fix REDHAT-BUG-2488480, upgrade the form-data library to version 4.0.6 or later.

3

What type of vulnerability is REDHAT-BUG-2488480?

REDHAT-BUG-2488480 is a CRLF Injection vulnerability.

4

In which software is REDHAT-BUG-2488480 present?

REDHAT-BUG-2488480 is present in the npm/form-data library.

5

When was REDHAT-BUG-2488480 published?

REDHAT-BUG-2488480 was published on June 12, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203