form-data

Ecosystem: npm

Downloads: 755.51 Mln

Vulnerabilities from the last (months)
  • 1CriticalAffects 3 versions
  • 1HighAffects 3 versions
  • 0MediumAffects 0 versions
  • 0ModerateAffects 0 versions
  • 0LowAffects 0 versions
Severity distribution (all time)
2vulnerabilities
  • Critical1 (50.0%)
  • High1 (50.0%)
  • Medium0 (0.0%)
  • Moderate0 (0.0%)
  • Low0 (0.0%)

Monthly breakdown

  • Critical
  • High
  • Medium
  • Moderate
  • Low
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 1 vulnerabilities
    • Critical: 1
    • High: 0
    • Medium: 0
    • Moderate: 0
    • Low: 0

Vulnerabilities (2)

Known vulnerabilities affecting form-data, based on data from OSV.

Vulnerabilities affecting form-data
IDSeveritySummaryAffected versionsPublishedSource
GHSA-hmw2-7cc7-3qxxHighform-data: CRLF injection in form-data via unescaped multipart field names and filenames## Summary `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 brows
  • < 2.5.6
  • >= 3.0.0, < 3.0.5
  • >= 4.0.0, < 4.0.6
GitHub (opens in a new tab)
GHSA-fjxv-7rqg-78g4Criticalform-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 generat
  • < 2.5.4
  • >= 3.0.0, < 3.0.4
  • >= 4.0.0, < 4.0.4
GitHub (opens in a new tab)
  • GHSA-hmw2-7cc7-3qxxHigh
    form-data: CRLF injection in form-data via unescaped multipart field names and filenames
    • < 2.5.6
    • >= 3.0.0, < 3.0.5
    • +1 more
    Affected versions:
    • < 2.5.6
    • >= 3.0.0, < 3.0.5
    • >= 4.0.0, < 4.0.6

    ## Summary `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 brows

    CVE: CVE-2026-12143

  • GHSA-fjxv-7rqg-78g4Critical
    form-data uses unsafe random function in form-data for choosing boundary
    • < 2.5.4
    • >= 3.0.0, < 3.0.4
    • +1 more
    Affected versions:
    • < 2.5.4
    • >= 3.0.0, < 3.0.4
    • >= 4.0.0, < 4.0.4

    ### 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 generat

    CVE: CVE-2025-7783

Showing 1-2 of 2 vulnerabilities