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
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| npm | form-data | < 2.5.4 | 2.5.4 |
| npm | form-data | >= 3.0.0, < 3.0.4 | 3.0.4 |
| npm | form-data | >= 4.0.0, < 4.0.4 | 4.0.4 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| form-data | < 2.5.4, 3.0.0 - 3.0.3, 4.0.0 - 4.0.3 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| harborist | 4.0 | 9.4 Critical | 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 |
| GitHub | 4.0 | 9.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
- github.com github.com
Vulnerability records
- GitHub Advisory GHSA-fjxv-7rqg-78g4 github.com
- CVE.org record CVE-2025-7783 cve.org
- NVD entry CVE-2025-7783 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com
- lists.debian.org lists.debian.org
- github.com github.com