Lookup for vulnerable packages by Package URL.

Purlpkg:npm/form-data@3.0.0
Typenpm
Namespace
Nameform-data
Version3.0.0
Qualifiers
Subpath
Is_vulnerabletrue
Next_non_vulnerable_version3.0.4
Latest_non_vulnerable_version4.0.4
Affected_by_vulnerabilities
0
url VCID-4pq8-1dxx-37gj
vulnerability_id VCID-4pq8-1dxx-37gj
summary
form-data uses unsafe random function in form-data for choosing boundary
### 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`](https://hackerone.com/reports/2913312) by [`parrot409`](https://hackerone.com/parrot409?type=user) -- 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 line here: https://github.com/form-data/form-data/blob/426ba9ac440f95d1998dac9a5cd8d738043b048f/lib/form_data.js#L347

An attacker who is able to predict the output of Math.random() can predict this boundary value, and craft a payload that contains the boundary value, followed by another, fully attacker-controlled field. This is roughly equivalent to any sort of improper escaping vulnerability, with the caveat that the attacker must find a way to observe other Math.random() values generated by the application to solve for the state of the PRNG. However, Math.random() is used in all sorts of places that might be visible to an attacker (including by form-data itself, if the attacker can arrange for the vulnerable application to make a request to an attacker-controlled server using form-data, such as a user-controlled webhook -- the attacker could observe the boundary values from those requests to observe the Math.random() outputs). A common example would be a `x-request-id` header added by the server. These sorts of headers are often used for distributed tracing, to correlate errors across the frontend and backend. `Math.random()` is a fine place to get these sorts of IDs (in fact, [opentelemetry uses Math.random for this purpose](https://github.com/open-telemetry/opentelemetry-js/blob/2053f0d3a44631ade77ea04f656056a2c8a2ae76/packages/opentelemetry-sdk-trace-base/src/platform/node/RandomIdGenerator.ts#L22))

### PoC

PoC here: https://github.com/benweissmann/CVE-2025-7783-poc

Instructions are in that repo. It's based on the PoC from https://hackerone.com/reports/2913312 but simplified somewhat; the vulnerable application has a more direct side-channel from which to observe Math.random() values (a separate endpoint that happens to include a randomly-generated request ID). 

### Impact

For an application to be vulnerable, it must:
- Use `form-data` to send data including user-controlled data to some other system. The attacker must be able to do something malicious by adding extra parameters (that were not intended to be user-controlled) to this request. Depending on the target system's handling of repeated parameters, the attacker might be able to overwrite values in addition to appending values (some multipart form handlers deal with repeats by overwriting values instead of representing them as an array)
- Reveal values of Math.random(). It's easiest if the attacker can observe multiple sequential values, but more complex math could recover the PRNG state to some degree of confidence with non-sequential values. 

If an application is vulnerable, this allows an attacker to make arbitrary requests to internal systems.
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-7783.json
reference_id
reference_type
scores
0
value 5.4
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-7783.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2025-7783
reference_id
reference_type
scores
0
value 0.00076
scoring_system epss
scoring_elements 0.22976
published_at 2026-04-02T12:55:00Z
1
value 0.00125
scoring_system epss
scoring_elements 0.31742
published_at 2026-04-09T12:55:00Z
2
value 0.00125
scoring_system epss
scoring_elements 0.31712
published_at 2026-04-08T12:55:00Z
3
value 0.00125
scoring_system epss
scoring_elements 0.31661
published_at 2026-04-07T12:55:00Z
4
value 0.00125
scoring_system epss
scoring_elements 0.3184
published_at 2026-04-04T12:55:00Z
5
value 0.00313
scoring_system epss
scoring_elements 0.54458
published_at 2026-04-11T12:55:00Z
6
value 0.00313
scoring_system epss
scoring_elements 0.54442
published_at 2026-04-12T12:55:00Z
7
value 0.00414
scoring_system epss
scoring_elements 0.6158
published_at 2026-04-21T12:55:00Z
8
value 0.00414
scoring_system epss
scoring_elements 0.61548
published_at 2026-04-13T12:55:00Z
9
value 0.00414
scoring_system epss
scoring_elements 0.6159
published_at 2026-04-16T12:55:00Z
10
value 0.00414
scoring_system epss
scoring_elements 0.61595
published_at 2026-04-18T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2025-7783
2
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-7783
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-7783
3
reference_url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
reference_id
reference_type
scores
0
value 6.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N
url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
4
reference_url https://github.com/benweissmann/CVE-2025-7783-poc
reference_id
reference_type
scores
0
value 9.4
scoring_system cvssv4
scoring_elements 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
1
value CRITICAL
scoring_system generic_textual
scoring_elements
url https://github.com/benweissmann/CVE-2025-7783-poc
5
reference_url https://github.com/form-data/form-data
reference_id
reference_type
scores
0
value 9.4
scoring_system cvssv4
scoring_elements 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
1
value CRITICAL
scoring_system generic_textual
scoring_elements
url https://github.com/form-data/form-data
6
reference_url https://github.com/form-data/form-data/commit/3d1723080e6577a66f17f163ecd345a21d8d0fd0
reference_id
reference_type
scores
0
value 9.4
scoring_system cvssv4
scoring_elements 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
1
value CRITICAL
scoring_system generic_textual
scoring_elements
2
value Track*
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:T/P:M/B:A/M:M/D:R/2025-07-22T14:54:27Z/
url https://github.com/form-data/form-data/commit/3d1723080e6577a66f17f163ecd345a21d8d0fd0
7
reference_url https://github.com/form-data/form-data/security/advisories/GHSA-fjxv-7rqg-78g4
reference_id
reference_type
scores
0
value CRITICAL
scoring_system cvssv3.1_qr
scoring_elements
1
value 9.4
scoring_system cvssv4
scoring_elements 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
2
value CRITICAL
scoring_system generic_textual
scoring_elements
3
value Track*
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:T/P:M/B:A/M:M/D:R/2025-07-22T14:54:27Z/
url https://github.com/form-data/form-data/security/advisories/GHSA-fjxv-7rqg-78g4
8
reference_url https://lists.debian.org/debian-lts-announce/2025/07/msg00023.html
reference_id
reference_type
scores
0
value 9.4
scoring_system cvssv4
scoring_elements 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
1
value CRITICAL
scoring_system generic_textual
scoring_elements
url https://lists.debian.org/debian-lts-announce/2025/07/msg00023.html
9
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-7783
reference_id
reference_type
scores
0
value 9.4
scoring_system cvssv4
scoring_elements 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
1
value CRITICAL
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2025-7783
10
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1109551
reference_id 1109551
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1109551
11
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2381959
reference_id 2381959
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2381959
12
reference_url https://access.redhat.com/errata/RHSA-2025:14886
reference_id RHSA-2025:14886
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:14886
13
reference_url https://access.redhat.com/errata/RHSA-2025:14919
reference_id RHSA-2025:14919
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:14919
14
reference_url https://access.redhat.com/errata/RHSA-2025:15771
reference_id RHSA-2025:15771
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:15771
15
reference_url https://access.redhat.com/errata/RHSA-2025:16101
reference_id RHSA-2025:16101
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:16101
16
reference_url https://access.redhat.com/errata/RHSA-2025:16113
reference_id RHSA-2025:16113
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:16113
17
reference_url https://access.redhat.com/errata/RHSA-2025:16918
reference_id RHSA-2025:16918
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:16918
18
reference_url https://access.redhat.com/errata/RHSA-2025:17501
reference_id RHSA-2025:17501
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:17501
19
reference_url https://access.redhat.com/errata/RHSA-2025:18278
reference_id RHSA-2025:18278
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:18278
20
reference_url https://access.redhat.com/errata/RHSA-2025:18744
reference_id RHSA-2025:18744
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:18744
21
reference_url https://access.redhat.com/errata/RHSA-2025:20047
reference_id RHSA-2025:20047
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:20047
22
reference_url https://access.redhat.com/errata/RHSA-2025:21704
reference_id RHSA-2025:21704
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:21704
23
reference_url https://access.redhat.com/errata/RHSA-2026:2737
reference_id RHSA-2026:2737
reference_type
scores
url https://access.redhat.com/errata/RHSA-2026:2737
24
reference_url https://access.redhat.com/errata/RHSA-2026:2800
reference_id RHSA-2026:2800
reference_type
scores
url https://access.redhat.com/errata/RHSA-2026:2800
25
reference_url https://access.redhat.com/errata/RHSA-2026:3406
reference_id RHSA-2026:3406
reference_type
scores
url https://access.redhat.com/errata/RHSA-2026:3406
26
reference_url https://usn.ubuntu.com/7976-1/
reference_id USN-7976-1
reference_type
scores
url https://usn.ubuntu.com/7976-1/
fixed_packages
0
url pkg:npm/form-data@3.0.4
purl pkg:npm/form-data@3.0.4
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/form-data@3.0.4
1
url pkg:npm/form-data@4.0.4
purl pkg:npm/form-data@4.0.4
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/form-data@4.0.4
aliases CVE-2025-7783, GHSA-fjxv-7rqg-78g4
risk_score 4.5
exploitability 0.5
weighted_severity 9.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-4pq8-1dxx-37gj
Fixing_vulnerabilities
Risk_score4.5
Resource_urlhttp://public2.vulnerablecode.io/packages/pkg:npm/form-data@3.0.0