Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Aug 13, 2025

This PR contains the following updates:

Package Change Age Confidence
form-data 2.5.1 -> 4.0.4 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

GitHub Vulnerability Alerts

CVE-2025-7783

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

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)

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.


Release Notes

form-data/form-data (form-data)

v4.0.4

Compare Source

Commits
  • [meta] add auto-changelog 811f682
  • [Tests] handle predict-v8-randomness failures in node < 17 and node > 23 1d11a76
  • [Fix] Switch to using crypto random for boundary values 3d17230
  • [Tests] fix linting errors 5e34080
  • [meta] actually ensure the readme backup isn’t published 316c82b
  • [Dev Deps] update @ljharb/eslint-config 58c25d7
  • [meta] fix readme capitalization 2300ca1

v4.0.3

Compare Source

Fixed
  • [Fix] append: avoid a crash on nullish values #577
Commits
  • [eslint] use a shared config 426ba9a
  • [eslint] fix some spacing issues 2094191
  • [Refactor] use hasown 81ab41b
  • [Fix] validate boundary type in setBoundary() method 8d8e469
  • [Tests] add tests to check the behavior of getBoundary with non-strings 837b8a1
  • [Dev Deps] remove unused deps 870e4e6
  • [meta] remove local commit hooks e6e83cc
  • [Dev Deps] update eslint 4066fd6
  • [meta] fix scripts to use prepublishOnly c4bbb13

v4.0.2

Compare Source

Merged
  • [Fix] set Symbol.toStringTag when available #573
  • [Fix] set Symbol.toStringTag when available #573
  • fix (npmignore): ignore temporary build files #532
  • fix (npmignore): ignore temporary build files #532
Fixed
  • [Fix] set Symbol.toStringTag when available (#​573) #396
  • [Fix] set Symbol.toStringTag when available (#​573) #396
  • [Fix] set Symbol.toStringTag when available #396
Commits
  • Merge tags v2.5.3 and v3.0.3 92613b9
  • [Tests] migrate from travis to GHA 806eda7
  • [Tests] migrate from travis to GHA 8fdb3bc
  • [Refactor] use Object.prototype.hasOwnProperty.call 7fecefe
  • [Refactor] use Object.prototype.hasOwnProperty.call 6e682d4
  • [Refactor] use Object.prototype.hasOwnProperty.call df3c1e6
  • [Dev Deps] update @types/node, browserify, coveralls, cross-spawn, eslint, formidable, in-publish, pkgfiles, pre-commit, puppeteer, request, tape, typescript 8261fcb
  • [Dev Deps] update @types/node, browserify, coveralls, cross-spawn, eslint, formidable, in-publish, pkgfiles, pre-commit, puppeteer, request, tape, typescript fb66cb7
  • [Dev Deps] update @types/node, browserify, coveralls, eslint, formidable, in-publish, phantomjs-prebuilt, pkgfiles, pre-commit, request, tape, typescript 819f6b7
  • [eslint] clean up ignores 3217b3d
  • [eslint] clean up ignores 3a9d480
  • [Fix] Buffer.from and Buffer.alloc require node 4+ c499f76
  • Only apps should have lockfiles b82f590
  • Only apps should have lockfiles b170ee2
  • [Deps] update combined-stream, mime-types 6b1ca1d
  • [Dev Deps] pin request which via tough-cookie ^2.4 depends on psl e5df7f2
  • [Deps] update mime-types 5a5bafe
  • Bumped version 2.5.3 9457283
  • [Dev Deps] pin request which via tough-cookie ^2.4 depends on psl 9dbe192
  • Merge tags v2.5.2 and v3.0.2 d53265d
  • Bumped version 2.5.2 7020dd4
  • [Dev Deps] downgrade cross-spawn 3fc1a9b
  • fix: move util.isArray to Array.isArray (#​564) edb555a
  • fix: move util.isArray to Array.isArray (#​564) 10418d1

v4.0.1

Compare Source

Fixes
  • npmignore temporary build files (#​532)
  • move util.isArray to Array.isArray (#​564)
Tests
  • migrate from travis to GHA

v4.0.0

Compare Source

Merged
  • Handle custom stream #382
Commits

v3.0.4

Compare Source

v3.0.3

Compare Source

Merged
  • [Fix] set Symbol.toStringTag when available #573
  • [Fix] set Symbol.toStringTag when available #573
  • fix (npmignore): ignore temporary build files #532
  • fix (npmignore): ignore temporary build files #532
Fixed
  • [Fix] set Symbol.toStringTag when available (#​573) #396
  • [Fix] set Symbol.toStringTag when available (#​573) #396
  • [Fix] set Symbol.toStringTag when available #396
Commits
  • Merge tags v2.5.3 and v3.0.3 92613b9
  • [Tests] migrate from travis to GHA 806eda7
  • [Tests] migrate from travis to GHA 8fdb3bc
  • [Refactor] use Object.prototype.hasOwnProperty.call 7fecefe
  • [Refactor] use Object.prototype.hasOwnProperty.call 6e682d4
  • [Refactor] use Object.prototype.hasOwnProperty.call df3c1e6
  • [Dev Deps] update @types/node, browserify, coveralls, cross-spawn, eslint, formidable, in-publish, pkgfiles, pre-commit, puppeteer, request, tape, typescript 8261fcb
  • [Dev Deps] update @types/node, browserify, coveralls, cross-spawn, eslint, formidable, in-publish, pkgfiles, pre-commit, puppeteer, request, tape, typescript fb66cb7
  • [Dev Deps] update @types/node, browserify, coveralls, eslint, formidable, in-publish, phantomjs-prebuilt, pkgfiles, pre-commit, request, tape, typescript 819f6b7
  • [eslint] clean up ignores 3217b3d
  • [eslint] clean up ignores 3a9d480
  • [Fix] Buffer.from and Buffer.alloc require node 4+ c499f76
  • Only apps should have lockfiles b82f590
  • Only apps should have lockfiles b170ee2
  • [Deps] update combined-stream, mime-types 6b1ca1d
  • [Dev Deps] pin request which via tough-cookie ^2.4 depends on psl e5df7f2
  • [Deps] update mime-types 5a5bafe
  • Bumped version 2.5.3 9457283
  • [Dev Deps] pin request which via tough-cookie ^2.4 depends on psl 9dbe192
  • Merge tags v2.5.2 and v3.0.2 d53265d
  • Bumped version 2.5.2 7020dd4
  • [Dev Deps] downgrade cross-spawn 3fc1a9b
  • fix: move util.isArray to Array.isArray (#​564) edb555a
  • fix: move util.isArray to Array.isArray (#​564) 10418d1

v3.0.2

Compare Source

Merged
  • [Fix] set Symbol.toStringTag when available #573
  • [Fix] set Symbol.toStringTag when available #573
  • fix (npmignore): ignore temporary build files #532
  • fix (npmignore): ignore temporary build files #532
Fixed
  • [Fix] set Symbol.toStringTag when available (#​573) #396
  • [Fix] set Symbol.toStringTag when available (#​573) #396
  • [Fix] set Symbol.toStringTag when available #396
Commits
  • Merge tags v2.5.3 and v3.0.3 92613b9
  • [Tests] migrate from travis to GHA 806eda7
  • [Tests] migrate from travis to GHA 8fdb3bc
  • [Refactor] use Object.prototype.hasOwnProperty.call 7fecefe
  • [Refactor] use Object.prototype.hasOwnProperty.call 6e682d4
  • [Refactor] use Object.prototype.hasOwnProperty.call df3c1e6
  • [Dev Deps] update @types/node, browserify, coveralls, cross-spawn, eslint, formidable, in-publish, pkgfiles, pre-commit, puppeteer, request, tape, typescript 8261fcb
  • [Dev Deps] update @types/node, browserify, coveralls, cross-spawn, eslint, formidable, in-publish, pkgfiles, pre-commit, puppeteer, request, tape, typescript fb66cb7
  • [Dev Deps] update @types/node, browserify, coveralls, eslint, formidable, in-publish, phantomjs-prebuilt, pkgfiles, pre-commit, request, tape, typescript 819f6b7
  • [eslint] clean up ignores 3217b3d
  • [eslint] clean up ignores 3a9d480
  • [Fix] Buffer.from and Buffer.alloc require node 4+ c499f76
  • Only apps should have lockfiles b82f590
  • Only apps should have lockfiles b170ee2
  • [Deps] update combined-stream, mime-types 6b1ca1d
  • [Dev Deps] pin request which via tough-cookie ^2.4 depends on psl e5df7f2
  • [Deps] update mime-types 5a5bafe
  • Bumped version 2.5.3 9457283
  • [Dev Deps] pin request which via tough-cookie ^2.4 depends on psl 9dbe192
  • Merge tags v2.5.2 and v3.0.2 d53265d
  • Bumped version 2.5.2 7020dd4
  • [Dev Deps] downgrade cross-spawn 3fc1a9b
  • fix: move util.isArray to Array.isArray (#​564) edb555a
  • fix: move util.isArray to Array.isArray (#​564) 10418d1

v3.0.1

Compare Source

Merged
  • Fix typo: ads -> adds #451
Commits
  • feat: add setBoundary method 55d90ce

v3.0.0

Compare Source

Merged
  • Update Readme.md #449
  • Update package.json #448
  • fix memory leak #447
  • form-data: Replaced PhantomJS Dependency #442
  • Fix constructor options in Typescript definitions #446
  • Fix the getHeaders method signatures #434
  • Update combined-stream (fixes #​422) #424
Fixed
  • Merge pull request #​424 from botgram/update-combined-stream #422
  • Update combined-stream (fixes #​422) #422
Commits
  • Add readable stream options to constructor type 80c8f74
  • Fixed: getHeaders method signatures f4ca7f8
  • Pass options to constructor if not used with new 4bde68e
  • Make userHeaders optional 2b4e478

v2.5.5

Compare Source

v2.5.4

Compare Source

v2.5.3

Compare Source

Merged
  • [Fix] set Symbol.toStringTag when available #573
  • [Fix] set Symbol.toStringTag when available #573
  • fix (npmignore): ignore temporary build files #532
  • fix (npmignore): ignore temporary build files #532
Fixed
  • [Fix] set Symbol.toStringTag when available (#​573) #396
  • [Fix] set Symbol.toStringTag when available (#​573) #396
  • [Fix] set Symbol.toStringTag when available #396
Commits
  • Merge tags v2.5.3 and v3.0.3 92613b9
  • [Tests] migrate from travis to GHA 806eda7
  • [Tests] migrate from travis to GHA 8fdb3bc
  • [Refactor] use Object.prototype.hasOwnProperty.call 7fecefe
  • [Refactor] use Object.prototype.hasOwnProperty.call 6e682d4
  • [Refactor] use Object.prototype.hasOwnProperty.call df3c1e6
  • [Dev Deps] update @types/node, browserify, coveralls, cross-spawn, eslint, formidable, in-publish, pkgfiles, pre-commit, puppeteer, request, tape, typescript 8261fcb
  • [Dev Deps] update @types/node, browserify, coveralls, cross-spawn, eslint, formidable, in-publish, pkgfiles, pre-commit, puppeteer, request, tape, typescript fb66cb7
  • [Dev Deps] update @types/node, browserify, coveralls, eslint, formidable, in-publish, phantomjs-prebuilt, pkgfiles, pre-commit, request, tape, typescript 819f6b7
  • [eslint] clean up ignores 3217b3d
  • [eslint] clean up ignores 3a9d480
  • [Fix] Buffer.from and Buffer.alloc require node 4+ c499f76
  • Only apps should have lockfiles b82f590
  • Only apps should have lockfiles b170ee2
  • [Deps] update combined-stream, mime-types 6b1ca1d
  • [Dev Deps] pin request which via tough-cookie ^2.4 depends on psl e5df7f2
  • [Deps] update mime-types 5a5bafe
  • Bumped version 2.5.3 9457283
  • [Dev Deps] pin request which via tough-cookie ^2.4 depends on psl 9dbe192
  • Merge tags v2.5.2 and v3.0.2 d53265d
  • Bumped version 2.5.2 7020dd4
  • [Dev Deps] downgrade cross-spawn 3fc1a9b
  • fix: move util.isArray to Array.isArray (#​564) edb555a
  • fix: move util.isArray to Array.isArray (#​564) 10418d1

v2.5.2

Compare Source

Merged
  • [Fix] set Symbol.toStringTag when available #573
  • [Fix] set Symbol.toStringTag when available #573
  • fix (npmignore): ignore temporary build files #532
  • fix (npmignore): ignore temporary build files #532
Fixed
  • [Fix] set Symbol.toStringTag when available (#​573) #396
  • [Fix] set Symbol.toStringTag when available (#​573) #396
  • [Fix] set Symbol.toStringTag when available #396
Commits
  • Merge tags v2.5.3 and v3.0.3 92613b9
  • [Tests] migrate from travis to GHA 806eda7
  • [Tests] migrate from travis to GHA 8fdb3bc
  • [Refactor] use Object.prototype.hasOwnProperty.call 7fecefe
  • [Refactor] use Object.prototype.hasOwnProperty.call 6e682d4
  • [Refactor] use Object.prototype.hasOwnProperty.call df3c1e6
  • [Dev Deps] update @types/node, browserify, coveralls, cross-spawn, eslint, formidable, in-publish, pkgfiles, pre-commit, puppeteer, request, tape, typescript 8261fcb
  • [Dev Deps] update @types/node, browserify, coveralls, cross-spawn, eslint, formidable, in-publish, pkgfiles, pre-commit, puppeteer, request, tape, typescript fb66cb7
  • [Dev Deps] update @types/node, browserify, coveralls, eslint, formidable, in-publish, phantomjs-prebuilt, pkgfiles, pre-commit, request, tape, typescript 819f6b7
  • [eslint] clean up ignores 3217b3d
  • [eslint] clean up ignores 3a9d480
  • [Fix] Buffer.from and Buffer.alloc require node 4+ c499f76
  • Only apps should have lockfiles b82f590
  • Only apps should have lockfiles b170ee2
  • [Deps] update combined-stream, mime-types 6b1ca1d
  • [Dev Deps] pin request which via tough-cookie ^2.4 depends on psl e5df7f2
  • [Deps] update mime-types 5a5bafe
  • Bumped version 2.5.3 9457283
  • [Dev Deps] pin request which via tough-cookie ^2.4 depends on psl 9dbe192
  • Merge tags v2.5.2 and v3.0.2 d53265d
  • Bumped version 2.5.2 7020dd4
  • [Dev Deps] downgrade cross-spawn 3fc1a9b
  • fix: move util.isArray to Array.isArray (#​564) edb555a
  • fix: move util.isArray to Array.isArray (#​564) 10418d1

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from koenmetsu as a code owner August 13, 2025 23:54
@renovate
Copy link
Contributor Author

renovate bot commented Aug 13, 2025

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm warn cli npm v11.6.1 does not support Node.js v16.15.0. This version of npm supports the following node versions: `^20.17.0 || >=22.9.0`. You can find the latest version at https://nodejs.org/.
npm warn Unknown env config "store". This will stop working in the next major version of npm.
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @angular/[email protected]
npm error Found: [email protected]
npm error node_modules/zone.js
npm error   zone.js@"0.10.3" from the root project
npm error
npm error Could not resolve dependency:
npm error peer zone.js@"^0.7.2" from @angular/[email protected]
npm error node_modules/@angular/core
npm error   @angular/core@"2.4.10" from the root project
npm error   peer @angular/core@"2.4.10" from @angular/[email protected]
npm error   node_modules/@angular/common
npm error     @angular/common@"2.4.10" from the root project
npm error     5 more (@angular/forms, @angular/platform-browser, ...)
npm error   8 more (@angular/compiler, @angular/compiler-cli, ...)
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/zone.js
npm error   peer zone.js@"^0.7.2" from @angular/[email protected]
npm error   node_modules/@angular/core
npm error     @angular/core@"2.4.10" from the root project
npm error     peer @angular/core@"2.4.10" from @angular/[email protected]
npm error     node_modules/@angular/common
npm error       @angular/common@"2.4.10" from the root project
npm error       5 more (@angular/forms, @angular/platform-browser, ...)
npm error     8 more (@angular/compiler, @angular/compiler-cli, ...)
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /runner/cache/others/npm/_logs/2025-09-27T00_13_10_809Z-eresolve-report.txt
npm error A complete log of this run can be found in: /runner/cache/others/npm/_logs/2025-09-27T00_13_10_809Z-debug-0.log

@renovate renovate bot force-pushed the renovate/npm-form-data-vulnerability branch from e9775dc to 8518b7d Compare August 19, 2025 07:24
@renovate renovate bot force-pushed the renovate/npm-form-data-vulnerability branch from 8518b7d to 837ece9 Compare August 19, 2025 07:52
@renovate renovate bot changed the title chore(deps): update dependency form-data to v2.5.5 [security] chore(deps): update dependency form-data to v4 [security] Aug 19, 2025
@renovate renovate bot changed the title chore(deps): update dependency form-data to v4 [security] chore(deps): update dependency form-data to v4 [security] - autoclosed Oct 16, 2025
@renovate renovate bot closed this Oct 16, 2025
@renovate renovate bot deleted the renovate/npm-form-data-vulnerability branch October 16, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant