CVE-2026-145492
form- data through 4. 0. 6 CRLF Injection via options. contentType and options. header
- Severity
- 6.3MediumNetwork attack, no privileges, no user interactionCVSS 4.0, CVE List
- Exploitation
- UnknownNo source reports exploitation yet.
- Exploit chance
- UnknownNo source reports an EPSS score yet.
- Listed fix
- None listedNo source lists a fixed version in its version data.Check the description and references.
Overview
form-data through 4.0.6 contains a CRLF injection vulnerability in _multiPartHeader that allows attackers to inject multipart part headers via unescaped options.contentType and options.header values. Attackers who influence these values can embed CRLF sequences and the boundary to smuggle extra form fields into multipart requests sent to receiving servers.
CVSS 4.0 vector
Exploitability
- Attack vector
- Network
- Complexity
- High
- Attack requirements
- Present
- Privileges needed
- None
- User interaction
- None
Impact on the vulnerable system
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Impact on subsequent systems
- Confidentiality
- None
- Integrity
- None
- Availability
- None
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NAffected
Only in multi-CVE advisories 1
Each of these advisories covers several CVEs at once, so it doesn’t establish that this one affects the package.
| Package | Affected | Fixed |
|---|---|---|
form-datanpm | before 2.5.6 From an advisory covering 2 CVEs | 2.5.6 |
| 3.0.0 up to 3.0.5 From an advisory covering 2 CVEs | 3.0.5 | |
| 4.0.0 up to 4.0.6 From an advisory covering 2 CVEs | 4.0.6 |
Products 1
Sources
CVE List Score usedCVSS 4.06.3
form-data through 4.0.6 CRLF Injection via options.contentType and options.header
form-data through 4.0.6 contains a CRLF injection vulnerability in _multiPartHeader that allows attackers to inject multipart part headers via unescaped options.contentType and options.header values. Attackers who influence these values can embed CRLF sequences and the boundary to smuggle extra form fields into multipart requests sent to receiving servers.
- Record
CVE-2026-145492- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-93
- Updated
- 2026-12-05
EUVDEUVD-2026-145098CVSS 4.06.3
form-data through 4.0.6 contains a CRLF injection vulnerability in _multiPartHeader that allows attackers to inject multipart part headers via unescaped options.contentType and options.header values. Attackers who influence these values can embed CRLF sequences and the boundary to smuggle extra form fields into multipart requests sent to receiving servers.
- Record
EUVD-2026-145098- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N - Updated
- 2026-12-05
GitHub AdvisoriesGHSA-rwww-8p95-xc5hCVSS 4.06.3
form-data through 4.0.6 contains a CRLF injection vulnerability in _multiPartHeader that allows...
form-data through 4.0.6 contains a CRLF injection vulnerability in _multiPartHeader that allows attackers to inject multipart part headers via unescaped options.contentType and options.header values. Attackers who influence these values can embed CRLF sequences and the boundary to smuggle extra form fields into multipart requests sent to receiving servers.
- Record
GHSA-rwww-8p95-xc5h- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-93
- Updated
- 2026-12-05
NVDCVSS 4.06.3
form-data through 4.0.6 contains a CRLF injection vulnerability in _multiPartHeader that allows attackers to inject multipart part headers via unescaped options.contentType and options.header values. Attackers who influence these values can embed CRLF sequences and the boundary to smuggle extra form fields into multipart requests sent to receiving servers.
- Record
CVE-2026-145492- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-93
- Updated
- 2026-12-05
OSVCVE-2026-12143CVSS 4.08.7
form-data does not escape CR/LF/quote in multipart field names and filenames (CRLF injection)
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.
- Record
CVE-2026-12143- CVSS 4.0
- 8.7 High
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 - Weakness
- CWE-93
- Updated
- 2026-12-05
OSVCVSS 4.06.3
form-data through 4.0.6 CRLF Injection via options.contentType and options.header
form-data through 4.0.6 contains a CRLF injection vulnerability in _multiPartHeader that allows attackers to inject multipart part headers via unescaped options.contentType and options.header values. Attackers who influence these values can embed CRLF sequences and the boundary to smuggle extra form fields into multipart requests sent to receiving servers.
- Record
CVE-2026-145492- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-93
- Updated
- 2026-12-05
OSVGHSA-hmw2-7cc7-3qxxCVSS 4.08.7
form-data: CRLF injection in form-data via unescaped multipart field names and filenames
Summary
form-data builds multipart/form-data request bodies. Through v4.0.5, the field name passed to FormData#append and the filename option are concatenated directly into the Content-Disposition header with no escaping of CR (\r), LF (\n), or ". An application that uses untrusted input as a field name or filename therefore lets an attacker terminate the header line and either inject additional headers or smuggle whole additional multipart parts into the request the application forwards to a backend.
This is CWE-93 (CRLF injection). It is a divergence from how browsers and the WHATWG HTML spec serialize form-data (they escape these characters), so the fix is to match that behavior. Severity is conditional: it depends on the consuming application passing attacker-controlled data as a field name or filename. Applications that only use fixed/trusted field names are not affected.
Details
In lib/form_data.js, _multiPartHeader builds the part header as:
'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || [])
and _getContentDisposition builds filename="' + filename + '"'. Neither escapes control characters, so a \r\n in field/filename ends the header line. The same applies to ", which can break out of the quoted parameter.
Proof of concept
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());
Before the fix this emits an injected X-Injected: true header line. A field name that also includes --<boundary> sequences can introduce additional parts (e.g. an extra name="is_admin" field), which a downstream parser accepts as legitimate.
Impact
For an application that uses untrusted field names/filenames:
- Field injection / override (integrity). Inject or override fields the backend trusts (e.g.
is_admin,role) — the primary demonstrated impact. - Header injection into the generated multipart part.
Claims of guaranteed privilege escalation, authentication bypass, high confidentiality impact, and availability impact are application-dependent downstream consequences, not properties of form-data itself, and are not demonstrated by the PoC.
Severity
The demonstrated, library-attributable impact is integrity (field/header injection); there is no demonstrated confidentiality disclosure or availability impact in form-data itself, and exploitation requires the consuming app to feed untrusted data into field names/filenames. A Moderate (≈5.3, I:L) rating is also defensible given that precondition.
Patch
Fixed in 4.0.6, 3.0.5, and 2.5.6. Users on older 0.x/1.x/2.x releases should upgrade to 2.5.6 or later.
The fix escapes \r, \n, and " as %0D, %0A, and %22 in field names and filenames, matching the WHATWG HTML multipart/form-data encoding algorithm that browsers implement. This neutralizes the injection while leaving ordinary field names (including name[0], dotted, and unicode names) unchanged.
Workaround
Until upgrading, validate or reject field names/filenames that contain control characters before calling append:
if (/[\r\n]/.test(field)) { throw new Error('invalid field name'); }
Credit
Reported by yueyueL.
- Record
GHSA-hmw2-7cc7-3qxx- CVSS 4.0
- 8.7 High
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 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-93
- Updated
- 2026-12-05
History
Recorded by Every CVE
| Day | Changed | Sources |
|---|---|---|
| Affected packages, published date, references | OSV | |
| References | OSV | |
| Other IDs, published date | EUVD | |
| Other IDs, references, severity | GitHub Advisories | |
| Severity | NVD | |
| First indexed | CVE List |
Upstream dates may differ.
References
github.com/form-data/form-data/blob/v4.0.6/lib/form_data.js
github.com/form-data/form-data/security/advisories/GHSA-hmw2-7cc7-3qxx
vulncheck.com/advisories/form-data-through-4.0.6-crlf-injection-via-options-contenttype-and-options-header
nvd.nist.gov/vuln/detail/CVE-2026-145492
github.com/advisories/GHSA-rwww-8p95-xc5h
security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-12143.json
npmjs.com/package/form-data
access.redhat.com/errata/RHSA-2026:33155
Show 65 more referencesShow less
access.redhat.com/errata/RHSA-2026:33160
access.redhat.com/errata/RHSA-2026:33163
access.redhat.com/errata/RHSA-2026:33173
access.redhat.com/errata/RHSA-2026:33183
access.redhat.com/errata/RHSA-2026:34342
access.redhat.com/errata/RHSA-2026:36319
access.redhat.com/errata/RHSA-2026:36625
access.redhat.com/errata/RHSA-2026:36754
access.redhat.com/errata/RHSA-2026:40262
access.redhat.com/errata/RHSA-2026:41031
access.redhat.com/errata/RHSA-2026:41066
access.redhat.com/errata/RHSA-2026:41928
access.redhat.com/errata/RHSA-2026:41929
access.redhat.com/errata/RHSA-2026:41951
access.redhat.com/errata/RHSA-2026:42146
access.redhat.com/errata/RHSA-2026:42796
access.redhat.com/errata/RHSA-2026:43052
access.redhat.com/errata/RHSA-2026:44263
access.redhat.com/errata/RHSA-2026:44267
access.redhat.com/errata/RHSA-2026:48124
access.redhat.com/errata/RHSA-2026:48151
access.redhat.com/errata/RHSA-2026:48693
access.redhat.com/errata/RHSA-2026:50300
access.redhat.com/errata/RHSA-2026:54770
access.redhat.com/errata/RHSA-2026:56338
access.redhat.com/errata/RHSA-2026:56366
access.redhat.com/errata/RHSA-2026:56431
access.redhat.com/errata/RHSA-2026:57013
access.redhat.com/errata/RHSA-2026:57545
access.redhat.com/errata/RHSA-2026:57590
access.redhat.com/errata/RHSA-2026:57801
access.redhat.com/errata/RHSA-2026:59136
access.redhat.com/errata/RHSA-2026:59153
access.redhat.com/errata/RHSA-2026:59155
access.redhat.com/errata/RHSA-2026:59556
access.redhat.com/errata/RHSA-2026:59557
access.redhat.com/errata/RHSA-2026:59558
access.redhat.com/errata/RHSA-2026:59559
access.redhat.com/errata/RHSA-2026:59579
access.redhat.com/errata/RHSA-2026:60387
access.redhat.com/errata/RHSA-2026:60388
access.redhat.com/errata/RHSA-2026:60389
access.redhat.com/errata/RHSA-2026:60390
access.redhat.com/errata/RHSA-2026:60391
access.redhat.com/errata/RHSA-2026:60446
access.redhat.com/errata/RHSA-2026:60477
access.redhat.com/errata/RHSA-2026:60520
access.redhat.com/errata/RHSA-2026:62260
access.redhat.com/errata/RHSA-2026:63047
access.redhat.com/errata/RHSA-2026:63355
access.redhat.com/errata/RHSA-2026:63373
access.redhat.com/errata/RHSA-2026:66003
access.redhat.com/errata/RHSA-2026:66488
access.redhat.com/errata/RHSA-2026:66545
access.redhat.com/security/cve/CVE-2026-12143
github.com/CVEProject/cvelistV5/tree/main/cves/2026/12xxx/CVE-2026-12143.json
nvd.nist.gov/vuln/detail/CVE-2026-12143
bugzilla.redhat.com/show_bug.cgi?id=2488480
github.com/form-data/form-data/commit/64190db548c0179e37206858e39f27cf513e9435
github.com/form-data/form-data/commit/be3f3cf553978bac15a5182f1f3c3d2d38ccf229
github.com/form-data/form-data/commit/c7133499c2ee1b80c678e411244f4442bf902045
github.com/form-data/form-data
cwe.mitre.org/data/definitions/93.html
html.spec.whatwg.org/multipage/form-control-infrastructure.html
github.com/CVEProject/cvelistV5/tree/main/cves/2026/145xxx/CVE-2026-145492.json