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

> Attackers can inject headers or smuggle parts via unescaped field names in form-data, potentially modifying downstream form data.

- **Severity:** High 8.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Jun 2026
- **Updated:** 11 Sep 2026
- **Also known as:** AZL-90099, CLEANSTART-2026-FQ89941, CLEANSTART-2026-JF12177, CLEANSTART-2026-OW89546, CLSA-2026-1784856187, CLSA-2026-1784856461, CLSA-2026-1784943225, CLSA-2026-1784943288, CLSA-2026-1785117379, CLSA-2026-1785117388, CLSA-2026-1785117393, CLSA-2026-1785117455, CLSA-2026-1785117456, CLSA-2026-1792476103, DEBIAN-CVE-2026-12143, ECHO-f0b6-5440-14d8, GHSA-hmw2-7cc7-3qxx, MINI-35gg-8p6v-f454, MINI-4222-h4pw-pq48, MINI-5hf3-3cfg-p9h2, MINI-5hjm-38g8-m4j9, MINI-6276-q479-355q, MINI-64x9-33jf-rm7h, MINI-65r7-q98f-fvj3, MINI-6f79-q77g-57wq, MINI-724m-xfvf-6ggj, MINI-7g9j-rxpj-g8pf, MINI-7xrw-chfv-wmqx, MINI-9284-wgrx-6w3x, MINI-c5wm-3925-v7h3, MINI-cgrr-3x56-g4hp, MINI-cmhj-4mc3-96xq, MINI-cq93-52p9-264v, MINI-cvwf-63rp-p4cx, MINI-gc24-wqh2-4hr3, MINI-ghvg-r6v6-cfrh, MINI-gqx2-2c7c-77fm, MINI-gvrw-jj78-3cc9, MINI-h5fc-2f4h-2h5q, MINI-hc3h-vvf3-mxxh, MINI-hf43-cr4g-82pq, MINI-hfmq-cj4x-9pxf, MINI-hrjv-3c8f-pjmw, MINI-j2hq-8c4h-mcm9, MINI-j4jg-9j66-ch8w, MINI-j79w-53vh-3275, MINI-m8hg-4w27-fqj6, MINI-mr9v-27wm-fhmv, MINI-mx42-76g4-c32j, MINI-pg2h-5f42-7gm5, MINI-qphx-v5p6-67xj, MINI-qrmq-rx9f-9pwp, MINI-r3xw-jw67-p46f, MINI-rwjv-mrwc-xfmh, MINI-v6vh-9m43-wcj7, MINI-vj5w-fmxv-22p3, MINI-vwjf-r7wx-85rf, MINI-wfv8-52jw-487j, MINI-wgxp-rpxr-83wq, MINI-x6w5-47vj-pp4j, MINI-x944-wv4p-r7p2, ROOT-APP-NPM-CVE-2026-12143, UBUNTU-CVE-2026-12143

## What is CVE-2026-12143?

CVE-2026-12143 is a high-severity vulnerability in form-data, published on 12 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-93 (Improper Neutralization of CRLF Sequences)

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

6 open source packages ship an affected version, including form-data.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `form-data` | npm | All versions | 2.5.6 |
| `form-data` | npm | All versions | 2.5.6 |
| `form-data` | npm | From 3.0.0 | 3.0.5 |
| `form-data` | npm | From 3.0.0 | 3.0.5 |
| `form-data` | npm | From 4.0.0 | 4.0.6 |
| `form-data` | npm | From 4.0.0 | 4.0.6 |

## How do I fix CVE-2026-12143?

Upgrade form-data to a fixed version for your release line: 2.5.6, 3.0.5 or 4.0.6.

## Is CVE-2026-12143 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-12143 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-12143 and fix it if it is affected.

What it is: CVE-2026-12143 is a high-severity vulnerability in form-data, published on 12 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-12143 exists.

Affected packages and fixed versions:
- form-data (npm): affected all versions; fixed in 2.5.6
- form-data (npm): affected all versions; fixed in 2.5.6
- form-data (npm): affected from 3.0.0; fixed in 3.0.5
- form-data (npm): affected from 3.0.0; fixed in 3.0.5
- form-data (npm): affected from 4.0.0; fixed in 4.0.6
- form-data (npm): affected from 4.0.0; fixed in 4.0.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-12143/ (Markdown: https://insights.sbomify.com/CVE-2026-12143/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-12143
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-12143
- OSV: https://osv.dev/vulnerability/CVE-2026-12143

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-12143/
Summaries are generated and may contain mistakes; the official description above is the record.
