Skip to main content
VulnerabilityPublished Updated

CVE-2025-7783: Form-data Uses Unsafe Random Function

Affects form-dataSource GCVE Database

0
Compare
Authoritative record:CVE-2025-7783· Critical 9.4

Not known to be exploited · CVSS 9.4 Critical : upgrade to 2.5.4 as a priority.

Data as of 30 Oct 2026, 01:46 UTC

CVSS 4.0 base score
9.4Critical
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (harborist)CVSS 4.09.4
Patch
Available – fixed in 2.5.4, 3.0.4, 4.0.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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 18 Jul 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.

What to do

Upgrade form-data to 2.5.4; form-data to 3.0.4; form-data to 4.0.4.

Affected software

ProductAffectedFixed in
npmform-dataAffected
  • <2.5.4
Fixed in
  • 2.5.4
npmform-dataAffected
  • >=3.0.0 <3.0.4
Fixed in
  • 3.0.4
npmform-dataAffected
  • >=4.0.0 <4.0.4
Fixed in
  • 4.0.4

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Fixed versions 2.5.4, 3.0.4, and 4.0.4 of form-data are available and should be applied to remediate this vulnerability. Applications should upgrade to these versions to ensure the boundary generation uses a secure random function. No other mitigations are specifically recommended by the vendor advisory.

Description

The form-data library uses the insecure Math.random() function to generate multipart form-data boundaries. Because Math.random() is predictable if an attacker can observe some outputs, an attacker who can observe random values and control a request field can craft requests that inject additional parameters by predicting the boundary value. This vulnerability affects applications using form-data versions prior to 2.5.4, between 3.0.0 and 3.0.4, and between 4.0.0 and 4.0.4. Fixed versions are available. Exploitation requires the ability to observe multiple Math.random() outputs and control part of the form-data content.

References

Community reviews

Loading reviews…