Security Digest · Vulnerability record

CVE-2025-7783: form-data uses unsafe random function in form-data for choosing boundary

Use of Insufficiently Random Values vulnerability in form-data allows HTTP Parameter Pollution (HPP).

CVSS 9.4 Critical EPSS 1.8% · p78

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
  • EPSS 1.8%, percentile 78: FIRST’s model estimates a 1.8% chance of exploitation activity in the next 30 days, higher than 78% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
  • Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
  • Only applies if your dependency tree includes form-data (npm) < 2.5.4, fixed in 2.5.4; form-data (npm) >= 3.0.0, < 3.0.4, fixed in 3.0.4; form-data (npm) >= 4.0.0, < 4.0.4, fixed in 4.0.4. Check your lockfile, including transitive dependencies.

What it is

Use of Insufficiently Random Values vulnerability in form-data allows HTTP Parameter Pollution (HPP). This vulnerability is associated with program files lib/formdata.Js. This issue affects form-data:

From the GitHub advisory

Summary

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

Weakness type: CWE-330.

Product: form-data (npm) · Assigned by: harborist · Published: 2025-07-18

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
npmform-data< 2.5.42.5.4
npmform-data>= 3.0.0, < 3.0.43.0.4
npmform-data>= 4.0.0, < 4.0.44.0.4
VendorProductAffected versions (per CVE record)
form-data< 2.5.4, 3.0.0 - 3.0.3, 4.0.0 - 4.0.3

Severity scores

Scored byCVSSScoreVector
harborist4.09.4 CriticalCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N
GitHub4.09.4 CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N
  • Attack vector: network (remotely reachable)
  • Attack complexity: high (needs special conditions)
  • Attack requirements: none
  • Privileges required: none (no login)
  • User interaction: none

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation poc, automatable no, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 1.81% probability of exploitation activity in the next 30 days; percentile 78.

Timeline

  • — CVE record published by harborist
  • — GitHub-reviewed advisory GHSA-fjxv-7rqg-78g4 published (critical)
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vendor and project advisories, patches

  1. github.com github.com

Vulnerability records

  1. GitHub Advisory GHSA-fjxv-7rqg-78g4 github.com
  2. CVE.org record CVE-2025-7783 cve.org
  3. NVD entry CVE-2025-7783 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. lists.debian.org lists.debian.org
  3. github.com github.com

Critical npm advisories · Today’s Security Digest