CRLF Injection Affecting form-data package, versions <2.5.6>=3.0.0 <3.0.5>=4.0.0 <4.0.6


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.32% (24th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about CRLF Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-FORMDATA-17337015
  • published14 Jun 2026
  • disclosed12 Jun 2026
  • creditYue (Knox) Liu

Introduced: 12 Jun 2026

NewCVE-2026-12143  (opens in a new tab)
CWE-93  (opens in a new tab)

How to fix?

Upgrade form-data to version 2.5.6, 3.0.5, 4.0.6 or higher.

Overview

Affected versions of this package are vulnerable to CRLF Injection via the _multiPartHeader function when untrusted input is provided via field or filename to FormData#append. An attacker can inject additional headers or multipart parts by including carriage returns, line feeds, or double quotes in the input. This can allow the modification or addition of form fields visible to downstream parsers.

PoC

const FormData = require('form-data');
const form = new FormData();
form.append('email"\r\nX-Injected: true\r\nfake="', 'user@example.com');
console.log(form.getBuffer().toString());

CVSS Base Scores

version 4.0
version 3.1