Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

GHSA-hmw2-7cc7-3qxx — form-data

HIGHFix: form-data/form-data@64190db

GHSA-hmw2-7cc7-3qxx is a high-severity (CVSS 7.5) CWE-93 vulnerability in form-data. A fix is available for form-data — see the affected versions and patch details below.

form-data: CRLF injection in form-data via unescaped multipart field names and filenames

Also known asCVE-2026-12143
Published
Jun 15, 2026
Updated
Sep 10, 2026
Affected
3 pkgs
Patched
3 / 3
Exploits
None indexed
Exploitation data as of Sep 27, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.

Exploitation and automatability from CISA’s SSVC triage for GHSA-hmw2-7cc7-3qxx.

EPSS Exploitation Probability

via FIRST.org ↗
0.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs50th percentile — riskier than 50% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-hmw2-7cc7-3qxx by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 379,842 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

3 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

15Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
form-datanpm
197.9Mdownloads / week

Description

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="', '[email protected]');
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.

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
📦npmform-dataall versions2.5.6npm install form-data@2.5.6
📦npmform-data≥ 3.0.0&&< 3.0.53.0.5npm install form-data@3.0.5
📦npmform-data≥ 4.0.0&&< 4.0.64.0.6npm install form-data@4.0.6

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for form-data, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update form-data to 2.5.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hmw2-7cc7-3qxx is resolved across your whole dependency graph.

  3. Workarounds

    Close the privilege gap rather than the entry point: audit which accounts, roles and service identities can reach the affected operation, drop the component to the least privilege it actually needs, and review file and directory permissions created by earlier installs — a default left in place is what makes this reachable.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

This is an Important impact flaw in the form-data library: a remote attacker can inject arbitrary headers or additional multipart parts via CRLF injection in field names or filenames, potentially overriding sensitive form fields and affecting data integrity. For RHOAI and RHEL AI, severity is Moderate because affected…

Workaround published by Red Hat
Applications using the `form-data` library should implement strict input validation and sanitization for all field names and filenames derived from untrusted sources. This prevents the injection of control characters (CR, LF, ") that could lead to header injection or form field overrides. Deployments that exclusively use fixed or trusted field names are not impacted.
Source: Red Hat security advisory for GHSA-hmw2-7cc7-3qxx (CC BY 4.0)
ProductFixed inAdvisory
Cryostat 4 on RHEL 9cryostat/cryostat-openshift-console-plugin-rhel9:4.2.0-13RHSA-2026:48151
Red Hat AMQ Broker 7.13.6form-dataRHSA-2026:66545
Red Hat AMQ Broker 7.14.1form-dataRHSA-2026:66488
Red Hat Ansible Automation Platform 2.6 for RHEL 9automation-platform-ui-0:2.6.13-1.el9apRHSA-2026:59136
Red Hat Data Grid 8.6.2form-dataRHSA-2026:41951
Red Hat Enterprise Linux 10rh-podman-desktop-0:1.1.2-1.el10_2RHSA-2026:57590
Cluster Observability Operator 1.5.0cluster-observability-operator/distributed-tracing-console-plugin-pf4-rhel9:1782840519RHSA-2026:34342
multicluster engine for Kubernetes 2.10multicluster-engine/console-mce-rhel9:1787079364RHSA-2026:59557

Frequently Asked Questions

## 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 brows
O3 Security · Impact-Aware SCA

Is GHSA-hmw2-7cc7-3qxx in your dependencies?

Find it across npm, including transitive dependencies.

GHSA-hmw2-7cc7-3qxx: form-data (High 7.5) | O3 Security