Fix Dependabot high-severity alerts (postcss, fast-uri, js-yaml, brace-expansion, nanoid) - #146
Open
claude[bot] wants to merge 1 commit into
Open
Fix Dependabot high-severity alerts (postcss, fast-uri, js-yaml, brace-expansion, nanoid)#146claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
…hed versions Resolves Dependabot alerts flagged as High severity: - postcss: arbitrary file read / path traversal via sourceMappingURL, ReDoS, XSS via unescaped </style> (multiple advisories) -> ^8.5.26 - fast-uri: host confusion via backslash authority introducer -> ^3.1.6 - js-yaml: quadratic CPU consumption in !!omap resolution (CVE-2026-59870) -> ^4.3.1 (top-level), ^3.15.1 for the nested @istanbuljs/load-nyc-config consumer (kept on the 3.x line since it uses the removed safeLoad/safeDump v3 API) Also pinned two additional high-severity transitive deps surfaced by npm audit that weren't in the visible screenshot: - brace-expansion: DoS via unbounded intermediate arrays -> ^2.1.4 - nanoid: custom generators loop indefinitely at size zero -> ^3.3.18 - image-size: bumped to the latest available ^2.0.2 (ICNS/JXL/HEIF DoS advisories currently have no patched release upstream; this dep is only reachable through the unused devDependency typescript-plugin-css-modules -> less, and the repo has no .less files, so it is not exploitable in this project regardless) npm audit high+critical count: 7 -> 2 (the 2 remaining are the upstream-unfixed image-size advisories above). Build (react-scripts build) passes; no test files exist in the repo to run.
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.
<!-- ccr-slack-attribution -->
Requested by Joe Ben Clark · Slack thread
What this fixes
Extends the existing
package.jsonoverridesblock (same pattern already used forloader-utils,lodash,json5, etc.) to pin transitive dependencies to their patched versions, resolving the open Dependabot alerts:postcsssourceMappingURLin CSS comments, ReDoS, XSS via unescaped</style>(multiple stacked advisories, all fixed together)^8.5.26fast-uri^3.1.6js-yaml!!omapresolution (CVE-2026-59870), fix not backported to 3.x/4.x until this release@istanbuljs/load-nyc-config)^4.3.1top-level;^3.15.1scoped to the@istanbuljs/load-nyc-configconsumer (kept on the 3.x line since that package still uses the v3-onlysafeLoad/safeDumpAPI removed in v4)Two additional high-severity
npm auditfindings that weren't visible in the screenshot (part of the "7 more alerts" not shown) were fixed the same way:brace-expansion^2.1.4nanoidsizeis zero^3.3.18All of the above are non-breaking patch/minor bumps within their existing major version lines — no major-version jumps were needed for any of these.
Known remaining issue (not fixable right now)
image-sizehas two open high-severity advisories (GHSA-w3rx-r6r6-pgpr — ICNS parser infinite loop; GHSA-5p2g-fcmc-qvqq — JXL/HEIF parser infinite loops). I bumped the override to^2.0.2, the latest published version, but confirmed via both advisories that no patched release exists yet upstream ("Patched versions: None"). This also leaveslessflagged, purely becauselessdepends on the vulnerableimage-size.Practical risk here is effectively nil:
image-size/lessare pulled in only through thetypescript-plugin-css-modulesdevDependency (an editor/TS-language-service plugin), and this repo has zero.lessfiles, so the vulnerable code path is never exercised. Will need a follow-up once upstream ships a fix.Verification
npm installregeneratedpackage-lock.jsoncleanly with the new overrides (nested duplicate oldpostcss6.x/7.x copies were deduped away entirely).npm audithigh+critical count: 7 high → 2 high (the 2 remaining are the unfixedimage-size/lessadvisories above; 0 critical before and after).CI=true npm run build(react-scripts build) completes successfully with no errors.npm testwas run; the repo currently has no test files (0 matchesfortestMatch), so there was nothing to execute — not a regression from this change.🤖 Generated with Claude Code
Generated by Claude Code