Skip to content

← Public intelligence

npm package

form-data

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

2 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 8.7npmAmendedPublished

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

    CVE-2026-12143 · GHSA-hmw2-7cc7-3qxx

    Affected
    • npm form-data < 2.5.6; >= 3.0.0, < 3.0.5; >= 4.0.0, < 4.0.6
    Fixed in
    4.0.63.0.52.5.6· Vendor fix available
    Issue
    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/formdata.js, multiPartHeader builds the part header as: and getContentDisposition builds…

    Recommended action: Upgrade to 4.0.6, 3.0.5 or 2.5.6 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Critical, CVSS 9.4npmAmendedPublished

    form-data uses unsafe random function in form-data for choosing boundary

    CVE-2025-7783 · GHSA-fjxv-7rqg-78g4

    Affected
    • npm form-data < 2.5.4; >= 3.0.0, < 3.0.4; >= 4.0.0, < 4.0.4
    Fixed in
    3.0.42.5.44.0.4· Vendor fix available
    Issue
    form-data uses Math.random() to select a boundary value for multipart form-encoded data. This can lead to a security issue if an attacker: 1. can observe other values produced by Math.random in the target application, and 2. can control one field of a request made using form-data Because the values of Math.random() are pseudo-random and predictable (see: https://blog.securityevaluators.com/hacking-the-javascript-lottery-80cc437e3b7f), an attacker who can observe a few sequential values can determine the state of the PRNG and predict future values, includes those used to generate form-data's boundary value. The allows the attacker to craft a value that contains a boundary value, allowing them to inject additional parameters into the request. This is largely the same vulnerability as was recently found in undici by parrot409 -- I'm not affiliated with that researcher but want to give credit where credit is due! My PoC is largely based on their work. Details The culprit is this…

    Recommended action: Upgrade to 4.0.4, 3.0.4 or 2.5.4 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →