fix(deps): patch 4 npm security vulnerabilities via overrides#367
Merged
Conversation
Closes Dependabot alerts #36 (form-data CRLF injection), #37 (ws@7 memory exhaustion), #38 (ws@8 memory exhaustion), #39 (js-yaml@3 quadratic DoS). All fixes use package.json overrides — no direct dependency changes: - form-data: ^3.0.4 → ^3.0.5 (CRLF injection in multipart field names) - ws (global, jsdom dep): 7.5.10 → 7.5.11 (memory exhaustion DoS) - ws (webpack-dev-server nested): >=8.20.1 → >=8.21.0 (same CVE, 8.x series) - js-yaml: ^4.2.0 (quadratic DoS in merge key handling; js-yaml resolves to 4.3.0 for all dependents, including the former 3.14.2 root copy) Production build verified clean after changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013S7BMjyXGSNLYkfFDWomuj
Change exact pin '7.5.11' to '^7.5.11' for consistency with all other overrides in the file. Resolved version is unchanged (still 7.5.11). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013S7BMjyXGSNLYkfFDWomuj
…ad breakage svgo@1.3.2 calls yaml.safeLoad() which was removed in js-yaml@4. Add a nested override to give svgo its own js-yaml@3.x while all other consumers get v4. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013S7BMjyXGSNLYkfFDWomuj
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
Patches 4 npm security vulnerabilities in the CRA frontend dependency tree using
package.jsonoverrides. No application code changed.Vulnerabilities fixed
form-data(CRLF injection)^3.0.5(patched from 3.0.4)ws@7(memory exhaustion)^7.5.11(patched from 7.5.10)ws@8in webpack-dev-server (memory exhaustion)>=8.21.0insidewebpack-dev-serverjs-yaml(quadratic expression DoS)^4.2.0; scoped away fromsvgo@1.3.2(see below)js-yaml: why there's a nested svgo override
svgo@1.3.2(pulled in by CRA's SVGR pipeline) callsyaml.safeLoad(), which was removed in js-yaml@4. A flat"js-yaml": "^4.2.0"override would silently break any build that processes an SVG import. The fix: a nested"svgo": {"js-yaml": "^3.14.2"}override gives svgo its own js-yaml@3.x while all other consumers get v4.Verified:
svgo/node_modules/js-yaml@3.15.0(safeLoad works), rootjs-yaml@4.3.0(load works).Vulnerabilities intentionally NOT fixed
These remain open; they require a
react-scriptsmajor version bump or CRA→Vite migration, which is out of scope for this PR:webpack-dev-server@4.15.2— 4 moderate CVEs (GHSA-9jgg-88mc-972h, -4v9v-hfq4-rm2v, -79cf-xcqc-c78w, -mx8g-39q3-5c79). Fix requires wds ≥5.2.5, locked by CRA.@babel/core— 1 low CVE. Fix requires major version bump, locked by CRA.http-proxy-middleware— 1 moderate CVE. Fix requires a CRA-breaking major bump.The ws @8 bump addresses the WebSocket-layer DoS in wds; the remaining wds CVEs are in wds's own application code.
Test plan
npm install+ lockfile regeneratednpm run build— cleanCI=true npm test— 88 tests pass, 6 suitesruff check+ruff format --check) — clean🤖 Generated with Claude Code
https://claude.ai/code/session_013S7BMjyXGSNLYkfFDWomuj