Skip to content

fix: resolve npm audit vulnerabilities - #397

Open
hong6316 wants to merge 3 commits into
developfrom
feature/npm-audit-vulnerabilities
Open

fix: resolve npm audit vulnerabilities#397
hong6316 wants to merge 3 commits into
developfrom
feature/npm-audit-vulnerabilities

Conversation

@hong6316

@hong6316 hong6316 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolve npm audit vulnerabilities by updating direct dependencies and adding overrides.

Direct Dependency Updates

Package From To Vulnerability Fixed
less ^4.6.7 ^4.8.1 image-size ICNS/JXL/HEIF infinite loop DoS
node-polyfill-webpack-plugin 4.0.0 4.1.0 Migrates to node-stdlib-browser (removes direct elliptic dep path)
postcss ^8.5.16 ^8.5.26 sourceMappingURL path traversal (GHSA-r28c-9q8g-f849, GHSA-fxqj-rqcc-2cmp)
tar ^7.5.19 ^7.5.22 Stack-overflow DoS via crafted long-path tar (GHSA-r292-9mhp-454m)

Overrides Added

Package Override Vulnerability Fixed
uuid >=11.1.1 Missing buffer bounds check in v3/v5/v6 (via sockjs/webpack-dev-server)

Previously Resolved (already in shrinkwrap via npm audit fix)

  • body-parser → 1.20.6 (DoS via invalid limit)
  • nanoid → 3.3.18 (infinite loop with negative/zero size)
  • svgo → 4.0.2 (removeScripts plugin bypass)
  • brace-expansion (top-level) → 1.1.18/2.1.4/5.0.9
  • fast-uri (top-level) → 3.1.5+
  • js-yaml (top-level) → 4.3.1+

Unresolved Sub-module Vulnerabilities

The following vulnerabilities remain because @enact/dev-utils and eslint-config-enact ship with their own npm-shrinkwrap.json, preventing root-level overrides from affecting their nested dependencies:

  • brace-expansion (via eslint-config-enact/eslint nested deps)
  • elliptic (via node-stdlib-browser → crypto-browserify; no upstream fix available)
  • fast-uri (via @enact/dev-utils nested ajv)
  • js-yaml (via @enact/dev-utils and eslint-config-enact nested deps)

These will be resolved when @enact/dev-utils and eslint-config-enact publish new versions with updated shrinkwraps.

Verification

  • ✅ Works on Node 20.20.2
  • npm run lint -- -- --report-unused-disable-directives --max-warnings 0 passes
  • ✅ No breaking API changes in updated packages (minor/patch versions only)
  • npm-shrinkwrap.json preserved and updated

🤖 Generated with Claude Code

@hong6316
hong6316 force-pushed the feature/npm-audit-vulnerabilities branch from 79fc56b to c7b9d3d Compare August 11, 2026 07:02
Update direct dependencies to fix security vulnerabilities:
- less: ^4.6.7 → ^4.8.1 (fixes image-size ICNS/JXL/HEIF DoS CVEs)
- node-polyfill-webpack-plugin: 4.0.0 → 4.1.0 (migrates from deprecated crypto-browserify path)
- postcss: ^8.5.16 → ^8.5.26 (fixes sourceMappingURL path traversal CVEs)
- tar: ^7.5.19 → ^7.5.22 (fixes stack-overflow DoS via crafted long-path tar)

Add npm overrides:
- uuid: >=11.1.1 (fixes buffer bounds check in v3/v5/v6 via sockjs/webpack-dev-server)

Remaining unresolved vulnerabilities are caused by sub-module dependencies
(@enact/dev-utils and eslint-config-enact) that ship their own npm-shrinkwrap.json,
preventing root-level overrides from taking effect:
- brace-expansion (via eslint-config-enact/eslint nested deps)
- elliptic (via node-stdlib-browser/crypto-browserify - no upstream fix available)
- fast-uri (via @enact/dev-utils nested ajv)
- js-yaml (via @enact/dev-utils and eslint-config-enact nested deps)

Co-Authored-By: Claude <noreply@anthropic.com>
@hong6316
hong6316 force-pushed the feature/npm-audit-vulnerabilities branch from c7b9d3d to 02b04f5 Compare August 13, 2026 07:19
jenkins_swp and others added 2 commits August 14, 2026 02:52
Mark globals as devDependency in npm-shrinkwrap.json.

Co-Authored-By: Claude <noreply@anthropic.com>
Refresh npm-shrinkwrap.json to reflect optimized package tree
deduplication from a clean install on Node 20.20.2.

Co-Authored-By: Claude <noreply@anthropic.com>
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