# CVE-2026-12143: form-data does not escape CR/LF/quote in multipart field names and filenames (CRLF injection)

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.7
- **CVSS:** 8.7 (v4.0, CNA) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: High; Availability impact: None; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.59% (percentile 76, 2026-11-28)
- **CWE:** CWE-93
- **Aliases:** GHSA-hmw2-7cc7-3qxx
- **Published:** 2026-06-12T18:01:30.362Z
- **Modified:** 2026-09-11T13:17:04.787Z

## Who should check

- Projects that depend on npm package form-data (\< 2.5.6)
- Anyone running form-data \< 2.5.6; \>= 3.0.0, \< 3.0.5; \>= 4.0.0, \< 4.0.6

## Description

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 \`is\_admin=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 and fixed versions

- npm `form-data`: affected \< 2.5.6; fixed 2.5.6, 3.0.5, 4.0.6 (osv)
- form-data: \< 2.5.6; \>= 3.0.0, \< 3.0.5; \>= 4.0.0, \< 4.0.6 (cvelist)

## Mitigation

- Upgrade form-data to one of 2.5.6, 3.0.5, 4.0.6 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-12143. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-12143.md
Affected: form-data < 2.5.6
Fixed in: 2.5.6, 3.0.5, 4.0.6

Steps:
1. Search this machine and project for form-data (npm), form-data: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-12143 being exploited?

There is no confirmed exploitation: CVE-2026-12143 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.59% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-12143?

High: CVSS 8.7 (v4.0, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-12143?

form-data \< 2.5.6.

### Is there a fix for CVE-2026-12143?

Yes. Fixed in 2.5.6, 3.0.5, 4.0.6. Upgrade form-data to one of 2.5.6, 3.0.5, 4.0.6 (or later in the same release line).

### How do I check if I'm affected by CVE-2026-12143?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/form-data/form-data/security/advisories/GHSA-hmw2-7cc7-3qxx>
- vendor: <https://access.redhat.com/errata/RHSA-2026:59136>
- vendor: <https://access.redhat.com/errata/RHSA-2026:48151>
- vendor: <https://access.redhat.com/errata/RHSA-2026:34342>
- vendor: <https://access.redhat.com/errata/RHSA-2026:57590>
- vendor: <https://access.redhat.com/errata/RHSA-2026:66545>
- vendor: <https://access.redhat.com/errata/RHSA-2026:66488>
- vendor: <https://access.redhat.com/errata/RHSA-2026:60387>
- vendor: <https://access.redhat.com/errata/RHSA-2026:60390>
- vendor: <https://access.redhat.com/errata/RHSA-2026:60388>
- vendor: <https://access.redhat.com/errata/RHSA-2026:60389>
- vendor: <https://access.redhat.com/errata/RHSA-2026:60391>
- vendor: <https://access.redhat.com/errata/RHSA-2026:36319>
- vendor: <https://access.redhat.com/errata/RHSA-2026:36625>
- vendor: <https://access.redhat.com/errata/RHSA-2026:56338>
- vendor: <https://access.redhat.com/errata/RHSA-2026:66003>
- vendor: <https://access.redhat.com/errata/RHSA-2026:59155>
- vendor: <https://access.redhat.com/errata/RHSA-2026:59153>
- vendor: <https://access.redhat.com/errata/RHSA-2026:41951>
- vendor: <https://access.redhat.com/errata/RHSA-2026:36754>
- vendor: <https://access.redhat.com/errata/RHSA-2026:41929>
- vendor: <https://access.redhat.com/errata/RHSA-2026:41928>
- vendor: <https://access.redhat.com/errata/RHSA-2026:50300>
- vendor: <https://access.redhat.com/errata/RHSA-2026:60520>
- vendor: <https://access.redhat.com/errata/RHSA-2026:63047>
- vendor: <https://access.redhat.com/errata/RHSA-2026:44263>
- vendor: <https://access.redhat.com/errata/RHSA-2026:57545>
- vendor: <https://access.redhat.com/errata/RHSA-2026:60446>
- vendor: <https://access.redhat.com/errata/RHSA-2026:44267>
- vendor: <https://access.redhat.com/errata/RHSA-2026:57801>
- vendor: <https://access.redhat.com/errata/RHSA-2026:60477>
- vendor: <https://access.redhat.com/errata/RHSA-2026:48693>
- vendor: <https://access.redhat.com/errata/RHSA-2026:54770>
- vendor: <https://access.redhat.com/errata/RHSA-2026:48124>
- vendor: <https://access.redhat.com/errata/RHSA-2026:62260>
- vendor: <https://access.redhat.com/errata/RHSA-2026:33155>
- vendor: <https://access.redhat.com/errata/RHSA-2026:33160>
- vendor: <https://access.redhat.com/errata/RHSA-2026:33163>
- vendor: <https://access.redhat.com/errata/RHSA-2026:33173>
- vendor: <https://access.redhat.com/errata/RHSA-2026:33183>
- vendor: <https://access.redhat.com/errata/RHSA-2026:56431>
- vendor: <https://access.redhat.com/errata/RHSA-2026:56366>
- vendor: <https://access.redhat.com/errata/RHSA-2026:57013>
- vendor: <https://access.redhat.com/errata/RHSA-2026:41031>
- vendor: <https://access.redhat.com/errata/RHSA-2026:42146>
- vendor: <https://access.redhat.com/errata/RHSA-2026:43052>
- vendor: <https://access.redhat.com/errata/RHSA-2026:42796>
- vendor: <https://access.redhat.com/errata/RHSA-2026:41066>
- vendor: <https://access.redhat.com/errata/RHSA-2026:40262>
- vendor: <https://access.redhat.com/errata/RHSA-2026:63373>
- vendor: <https://access.redhat.com/errata/RHSA-2026:63355>
- vendor: <https://access.redhat.com/errata/RHSA-2026:59556>
- vendor: <https://access.redhat.com/errata/RHSA-2026:59557>
- vendor: <https://access.redhat.com/errata/RHSA-2026:59579>
- vendor: <https://access.redhat.com/errata/RHSA-2026:59558>
- vendor: <https://access.redhat.com/errata/RHSA-2026:59559>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-12143>
- patch: <https://github.com/form-data/form-data/commit/64190db548c0179e37206858e39f27cf513e9435>
- patch: <https://github.com/form-data/form-data/commit/be3f3cf553978bac15a5182f1f3c3d2d38ccf229>
- patch: <https://github.com/form-data/form-data/commit/c7133499c2ee1b80c678e411244f4442bf902045>
- article: <https://cwe.mitre.org/data/definitions/93.html>
- article: <https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data>
- other: <https://www.npmjs.com/package/form-data>
- other: <https://access.redhat.com/security/cve/CVE-2026-12143>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2488480>
- other: <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-12143.json>
- other: <https://github.com/form-data/form-data>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-12143>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-hmw2-7cc7-3qxx> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-12143> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-12143>
