Fix critical dependency vulnerabilities (form-data, tar) - #1
Open
edward-beacon wants to merge 1 commit into
Open
Fix critical dependency vulnerabilities (form-data, tar)#1edward-beacon wants to merge 1 commit into
edward-beacon wants to merge 1 commit into
Conversation
- Override form-data to ^2.5.6. It was pinned at 2.3.3 by the deprecated `request` package (via coveralls), which fixes: - CVE-2025-7783 / GHSA-fjxv-7rqg-78g4 (critical): unsafe random boundary generation - CVE-2026-12143 / GHSA-hmw2-7cc7-3qxx (high): CRLF injection - Bump ava floor to ^6.4.1 so @vercel/nft resolves to 0.29.x, which moves @mapbox/node-pre-gyp to 2.x and tar from 6.2.1 to 7.5.22. This fixes GHSA-23hp-3jrh-7fpw (critical, decompression DoS) and all eight open node-tar Dependabot alerts. npm audit: critical 3 -> 0. Lint and tests pass. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves the open critical Dependabot alert (form-data, CVE-2025-7783) and a second critical that
npm auditreports but Dependabot has not surfaced yet (tar, GHSA-23hp-3jrh-7fpw).All affected packages are devDependencies. The published SDK (
src/index.js) has no runtime dependencies, so none of these alerts affect consumers of the package. They do affect anyone running lint/test/coverage in this repo or CI.Changes
package.jsonoverrides: { "form-data": "^2.5.6" }form-data2.3.3 is pinned by the deprecatedrequestpackage (viacoveralls), so npm cannot upgrade it on its own. The override forces the patched 2.5.6, which stays on the same 2.x linerequestexpects.package.jsonava^6.2.0→^6.4.1@vercel/nft0.29.x →@mapbox/node-pre-gyp2.x →tar7.5.22, replacing the unpatchedtar6.2.1.package-lock.jsonnpm installVerification
npm run lintandnpm testpass.npm audit: critical 3 → 0, total 29 → 26.Dependabot alerts closed by this PR (11)
Also fixed (in
npm audit, not yet in Dependabot): tar GHSA-23hp-3jrh-7fpw (critical), GHSA-8x88-c5mf-7j5w (high), GHSA-r292-9mhp-454m (high), GHSA-gvwx-54wh-qm9j (medium).25 Dependabot alerts remain open after this merge: 0 critical, 11 high, 13 medium, 1 low.
Full list: https://github.com/electionbuddy/electionbuddy-node/security/dependabot
This PR was intentionally scoped to the critical alerts. The rest need follow-up work:
High (11)
npm audit fixcan resolveMedium (13)
requestandnyc/istanbul-lib-processinforequestrequestrequestis deprecated and unmaintained.opn-cli→meow3.xLow (1)
Recommended follow-ups (in priority order)
coveralls. It depends on the deprecatedrequest, which has an unfixable SSRF (#3) and drags inform-data,qs,tough-cookie,uuid@3, andjs-yaml@3. It also appears unused:.travis.ymlcallsnpm run coveralls, but no such script exists inpackage.json, and there is no GitHub Actions workflow in the repo. Removing it also lets theform-dataoverride in this PR be deleted.opn-cli(unmaintained; pullsmeow3.x →trim-newlines,yargs-parser) withopen-cli, or drop the opener from thereportscript.npm audit fixfor the remaining non-breaking updates (brace-expansion, minimatch, glob, picomatch, flatted, lodash, js-yaml, @humanfs/node, @babel/core). npm reports a fix available for all of them without semver-major changes.nyc17 → 18 (semver-major) to clear theistanbul-lib-processinfo→uuidchain..github/dependabot.ymlonly configures thedevcontainersecosystem, so Dependabot will raise security alerts but will never open update PRs for npm packages. Adding apackage-ecosystem: "npm"entry would keep this from piling up again.🤖 Generated with Claude Code