8.7high
form-data does not escape CR/LF/quote in multipart field names and filenames (CRLF injection)
- Severity
- 8.7high CVSS:4.0 by harborist
- Exploit likelihood
- 1.36% (higher than 72% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- harborist
- Also known as
- GHSA-hmw2-7cc7-3qxx
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
| Product or package | Versions | Reported by |
|---|---|---|
| form-data | before 2.5.6, from 3.0.0 before 3.0.5, from 4.0.0 before 4.0.6 | CVE List |
| cryostat/cryostat-openshift-console-plugin-rhel9 | Not specified Not affected: from 4.2.0-13 before * | CVE List |
| automation-platform-ui | Not specified Not affected: from 0:2.6.13-1.el9ap before * | CVE List |
| rh-podman-desktop | Not specified Not affected: from 0:1.1.2-1.el10_2 before * | CVE List |
| cluster-observability-operator/distributed-tracing-console-plugin-pf4-rhel9 | Not specified Not affected: from 1782840519 before * | CVE List |
| cluster-observability-operator/distributed-tracing-console-plugin-pf5-rhel9 | Not specified Not affected: from 1782839981 before * | CVE List |
| cluster-observability-operator/distributed-tracing-console-plugin-pf6-rhel9 | Not specified Not affected: from 1782839193 before * | CVE List |
| cluster-observability-operator/distributed-tracing-console-plugin-rhel9 | Not specified Not affected: from 1782838753 before * | CVE List |
| cluster-observability-operator/logging-console-plugin-pf4-rhel9 | Not specified Not affected: from 1782839279 before * | CVE List |
| cluster-observability-operator/logging-console-plugin-pf5-rhel9 | Not specified Not affected: from 1782840539 before * | CVE List |
| cluster-observability-operator/logging-console-plugin-rhel9 | Not specified Not affected: from 1782841925 before * | CVE List |
| cluster-observability-operator/monitoring-console-plugin-pf5-rhel9 | Not specified Not affected: from 1782844225 before * | CVE List |
| cluster-observability-operator/monitoring-console-plugin-pf6-rhel9 | Not specified Not affected: from 1782839658 before * | CVE List |
| cluster-observability-operator/monitoring-console-plugin-rhel9 | Not specified Not affected: from 1782838476 before * | CVE List |
| cluster-observability-operator/troubleshooting-panel-console-plugin-pf6-rhel9 | Not specified Not affected: from 1782839996 before * | CVE List |
| cluster-observability-operator/troubleshooting-panel-console-plugin-rhel9 | Not specified Not affected: from 1782839494 before * | CVE List |
| multicluster-engine/console-mce-rhel9 | Not specified Not affected: from 1787079364 before *, from 1787065052 before *, from 1787264250 before *, from 1787259048 before *, from 1787079359 before * | CVE List |
| rhacm2/console-rhel9 | Not specified Not affected: from 1787687062 before *, from 1787339249 before *, from 1787339248 before *, from 1787341780 before *, from 1787339213 before * | CVE List |
| advanced-cluster-security/rhacs-main-rhel8 | Not specified Not affected: from 1783357116 before *, from 1783357140 before * | CVE List |
| ansible-automation-platform/automation-portal | Not specified Not affected: from 1787047114 before * | CVE List |
| ansible-automation-platform/bootc-automation-portal-rhel9 | Not specified Not affected: from 1788943531 before * | CVE List |
| ansible-automation-platform-26/gateway-rhel9 | Not specified Not affected: from 1787219751 before * | CVE List |
| ansible-automation-platform-27/gateway-rhel9 | Not specified Not affected: from 1787218409 before * | CVE List |
| rhdh/rhdh-hub-rhel9 | Not specified Not affected: from 1783448184 before *, from 1784210921 before * | CVE List |
| rhmtc/openshift-migration-ui-rhel8 | Not specified Not affected: from 1783690532 before * | CVE List |
| mta/mta-ui-rhel9 | Not specified Not affected: from 1785169013 before * | CVE List |
| rhoai/odh-dashboard-rhel9 | Not specified Not affected: from 1787347991 before * | CVE List |
| rhoai/odh-mod-arch-automl-rhel9 | Not specified Not affected: from 1787250508 before * | CVE List |
| rhoai/odh-mod-arch-autorag-rhel9 | Not specified Not affected: from 1787251550 before * | CVE List |
| rhoai/odh-mod-arch-gen-ai-rhel9 | Not specified Not affected: from 1786611759 before * | CVE List |
| rhoai/odh-mod-arch-maas-rhel9 | Not specified Not affected: from 1787251250 before * | CVE List |
| rhoai/odh-mod-arch-model-registry-rhel9 | Not specified Not affected: from 1787250617 before * | CVE List |
| openshift4/ose-monitoring-plugin-rhel9 | Not specified Not affected: from 1788318661 before *, from 1787736396 before *, from 1787590390 before *, from 1786586789 before * | CVE List |
| openshift4/ose-agent-installer-ui-rhel9 | Not specified Not affected: from 1784724699 before *, from 1784713741 before *, from 1785230147 before * | CVE List |
| openshift4/ose-console-rhel9 | Not specified Not affected: from 1787080892 before *, from 1787014197 before *, from 1786607915 before * | CVE List |
| odf4/cephcsi-rhel9 | Not specified Not affected: from 1786705347 before *, from 1786701839 before *, from 1786627460 before * | CVE List |
| odf4/cephcsi-rhel9-operator | Not specified Not affected: from 1786706101 before *, from 1786701555 before *, from 1786626399 before * | CVE List |
| odf4/mcg-core-rhel9 | Not specified Not affected: from 1786705558 before *, from 1786702052 before *, from 1786628235 before * | CVE List |
| odf4/mcg-rhel9-operator | Not specified Not affected: from 1786705646 before *, from 1786702559 before *, from 1786627106 before * | CVE List |
| odf4/ocs-client-console-rhel9 | Not specified Not affected: from 1786706138 before *, from 1786702713 before *, from 1786629761 before * | CVE List |
| odf4/ocs-client-rhel9-operator | Not specified Not affected: from 1786705741 before *, from 1786702264 before *, from 1786627559 before * | CVE List |
| odf4/ocs-metrics-exporter-rhel9 | Not specified Not affected: from 1786705777 before *, from 1786702448 before *, from 1786687918 before * | CVE List |
| odf4/ocs-rhel9-operator | Not specified Not affected: from 1786705802 before *, from 1786702276 before *, from 1786629478 before * | CVE List |
| odf4/odf-cli-rhel9 | Not specified Not affected: from 1786705938 before *, from 1786702440 before *, from 1786628142 before * | CVE List |
| odf4/odf-console-rhel9 | Not specified Not affected: from 1786706577 before *, from 1786703071 before *, from 1786628053 before * | CVE List |
| odf4/odf-cosi-sidecar-rhel9 | Not specified Not affected: from 1786706125 before *, from 1786702563 before *, from 1786627382 before * | CVE List |
| odf4/odf-csi-addons-rhel9-operator | Not specified Not affected: from 1786706177 before *, from 1786702636 before *, from 1786627430 before * | CVE List |
| odf4/odf-csi-addons-sidecar-rhel9 | Not specified Not affected: from 1786706188 before *, from 1786702623 before *, from 1786629076 before * | CVE List |
| odf4/odf-multicluster-console-rhel9 | Not specified Not affected: from 1786706679 before *, from 1786703137 before *, from 1786688215 before * | CVE List |
| odf4/odf-multicluster-rhel9-operator | Not specified Not affected: from 1786706357 before *, from 1786702716 before *, from 1786628340 before * | CVE List |
| odf4/odf-must-gather-rhel9 | Not specified Not affected: from 1786706612 before *, from 1786702872 before *, from 1786628623 before * | CVE List |
| odf4/odf-rhel9-operator | Not specified Not affected: from 1786706644 before *, from 1786702949 before *, from 1786632256 before * | CVE List |
| odf4/odr-rhel9-operator | Not specified Not affected: from 1786706659 before *, from 1786702917 before *, from 1786628935 before * | CVE List |
| odf4/rook-ceph-rhel9-operator | Not specified Not affected: from 1786706880 before *, from 1786703143 before *, from 1786629548 before * | CVE List |
| odf4/odf-cloudnative-pg-rhel9-operator | Not specified Not affected: from 1786702315 before *, from 1786631508 before * | CVE List |
| odf4/odf-external-snapshotter-rhel9-operator | Not specified Not affected: from 1786627469 before * | CVE List |
| odf4/odf-external-snapshotter-sidecar-rhel9 | Not specified Not affected: from 1786644072 before * | CVE List |
| devspaces/code-rhel9 | Not specified Not affected: from 1785245777 before *, from 1787762793 before * | CVE List |
| devspaces/dashboard-rhel9 | Not specified Not affected: from 1784737150 before * | CVE List |
| openshift-service-mesh/kiali-ossmc-rhel8 | Not specified Not affected: from 1781937133 before * | CVE List |
| openshift-service-mesh/kiali-rhel8 | Not specified Not affected: from 1782287580 before * | CVE List |
| openshift-service-mesh/kiali-ossmc-rhel9 | Not specified Not affected: from 1782201894 before *, from 1782201696 before *, from 1782201851 before *, from 1782231869 before * | CVE List |
| openshift-service-mesh/kiali-rhel9 | Not specified Not affected: from 1782201833 before *, from 1782201537 before *, from 1782201812 before *, from 1782201466 before * | CVE List |
| quay/quay-rhel8 | Not specified Not affected: from 1783750447 before *, from 1783751865 before *, from 1784353904 before *, from 1784351966 before *, from 1784125838 before * | CVE List |
| quay/quay-rhel9 | Not specified Not affected: from 1783955846 before * | CVE List |
| satellite/iop-host-inventory-frontend-rhel9 | Not specified Not affected: from 1788322243 before *, from 1788260941 before * | CVE List |
| cryostat-openshift-console-plugin-npm | Not specified | CVE List |
| mta/mta-ui-rhel8 | Not specified | CVE List |
| network-observability/network-observability-console-plugin-pf4-rhel9 | Not specified | CVE List |
| network-observability/network-observability-console-plugin-pf5-rhel9 | Not specified | CVE List |
| network-observability/network-observability-console-plugin-rhel9 | Not specified | CVE List |
| workload-availability/node-healthcheck-must-gather-rhel9 | Not specified | CVE List |
| workload-availability/node-healthcheck-operator-bundle | Not specified | CVE List |
| workload-availability/node-healthcheck-rhel9-operator | Not specified | CVE List |
| workload-availability/node-remediation-console-rhel8 | Not specified | CVE List |
| openshift-pipelines/pipelines-console-plugin-pf5-rhel9 | Not specified | CVE List |
| openshift-pipelines/pipelines-console-plugin-rhel8 | Not specified | CVE List |
| openshift-pipelines/pipelines-console-plugin-rhel9 | Not specified | CVE List |
| openshift-pipelines/pipelines-hub-ui-rhel8 | Not specified | CVE List |
| openshift-pipelines/pipelines-hub-ui-rhel9 | Not specified | CVE List |
| openshift-service-mesh/kiali-operator-bundle | Not specified | CVE List |
| openshift-service-mesh/kiali-rhel9-operator | Not specified | CVE List |
| 3scale-amp21/system | Not specified | CVE List |
| 3scale-amp22/system | Not specified | CVE List |
| 3scale-amp2/system-rhel7 | Not specified | CVE List |
| 3scale-amp2/system-rhel8 | Not specified | CVE List |
| 3scale-amp2/system-rhel9 | Not specified | CVE List |
| ansible-automation-platform/automation-dashboard-rhel9 | Not specified | CVE List |
| automation-gateway | Not specified | CVE List |
| automation-hub | Not specified | CVE List |
| python3.11-galaxy-ng | Not specified | CVE List |
| python3.12-galaxy-ng | Not specified | CVE List |
| python3x-galaxy-ng | Not specified | CVE List |
| python-galaxy-ng | Not specified | CVE List |
| apicurio/apicurio-registry-ui-rhel8 | Not specified | CVE List |
| apicurio/apicurio-registry-ui-rhel9 | Not specified | CVE List |
| rh-podman-desktop.git | Not specified | CVE List |
| rhdesktop/rh-podman-desktop-ext-openshift-local-rhel10 | Not specified | CVE List |
| rhdesktop/rh-podman-desktop-ext-rhel-rhel10 | Not specified | CVE List |
| rhdesktop/rh-podman-desktop-ext-sandbox-rhel10 | Not specified | CVE List |
| discovery/discovery-ui-rhel9 | Not specified | CVE List |
| firefox | Not specified | CVE List |
| gjs | Not specified | CVE List |
| thunderbird | Not specified | CVE List |
| subscription-manager | Not specified | CVE List |
| cockpit-composer | Not specified | CVE List |
| dotnet5.0-build-reference-packages | Not specified | CVE List |
| dotnet8.0 | Not specified | CVE List |
| grafana | Not specified | CVE List |
| grafana-pcp | Not specified | CVE List |
| mozjs60 | Not specified | CVE List |
| pcs | Not specified | CVE List |
| rhelai3/bootc-cuda-rhel9 | Not specified | CVE List |
| rhelai3/bootc-gaudi-rhel9 | Not specified | CVE List |
| rhelai3/bootc-rocm-rhel9 | Not specified | CVE List |
| rhelai3/disk-image-cuda-rhel9 | Not specified | CVE List |
| yarnpkg | Not specified | CVE List |
| rhoai/odh-mlflow-rhel9 | Not specified | CVE List |
| rhoai/odh-mod-arch-eval-hub-rhel9 | Not specified | CVE List |
| rhoai/odh-mod-arch-mlflow-rhel9 | Not specified | CVE List |
| openshift4/ose-console | Not specified | CVE List |
| openshift4/ose-monitoring-plugin-rhel8 | Not specified | CVE List |
| openshift-gitops-1/argocd-rhel8 | Not specified | CVE List |
| openshift-gitops-1/argocd-rhel9 | Not specified | CVE List |
| container-native-virtualization/kubevirt-console-plugin | Not specified | CVE List |
| container-native-virtualization/kubevirt-console-plugin-rhel9 | Not specified | CVE List |
| satellite/iop-advisor-frontend-rhel9 | Not specified | CVE List |
| satellite/iop-remediations-rhel9 | Not specified | CVE List |
| satellite/iop-vulnerability-frontend-rhel9 | Not specified | CVE List |
| rhtas/rhtas-console-ui-rhel9 | Not specified | CVE List |
| rhtpa/rhtpa-trustification-service-rhel9 | Not specified | CVE List |
| form-data (npm) | before 2.5.6, from 3.0.0 before 3.0.5, from 4.0.0 before 4.0.6 | GitHub Advisory Database |
All scores
| harborist | 8.7high CVSS:4.0 | 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 |
| harborist | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| redhat-SADP | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | high CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-12143 changed 2026-09-11 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hmw2-7cc7-3qxx changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-12143 changed 2026-09-11 | Public domain |