fix: patch serialize-javascript RCE and minimatch ReDoS vulnerabilities#484
Open
rickalee wants to merge 2 commits into10up:developfrom
Open
fix: patch serialize-javascript RCE and minimatch ReDoS vulnerabilities#484rickalee wants to merge 2 commits into10up:developfrom
rickalee wants to merge 2 commits into10up:developfrom
Conversation
…esolve serialize-javascript CVEs Bumps copy-webpack-plugin ^11 -> ^14 and image-minimizer-webpack-plugin ^3.8.3 -> ^5.0.0. Both v14/v5 declare serialize-javascript ^7.0.3 which now resolves to the patched 7.0.5, fixing GHSA-5c6j-r48x-rmvq (RCE via RegExp.flags) and GHSA-qj8w-gfj5-8c6v (CPU exhaustion).
🦋 Changeset detectedLatest commit: b2080ba The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…86-cg39-jmmj, GHSA-23c5-xmqv-rm74 `@typescript-eslint@^6` (used by this toolkit) depends on `minimatch: ^9.0.3`, which resolves into the vulnerable range `9.0.0–9.0.6`. All three ReDoS CVEs are fixed in minimatch@9.0.7. Adding `"overrides": { "minimatch": "^9.0.7" }` to the monorepo root pins the transitive minimatch dep to 9.0.9 (current latest-v9) for all packages in this repo, without requiring a major @typescript-eslint or ESLint upgrade. The proper long-term fix is upgrading to @typescript-eslint@8 once WordPress/Gutenberg completes their ESLint v10 migration (gutenberg#64782).
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
copy-webpack-pluginfrom^11to^14to fix GHSA-5c6j-r48x-rmvq and GHSA-qj8w-gfj5-8c6v (serialize-javascriptRCE + CPU exhaustion)image-minimizer-webpack-pluginfrom^3to^5(sameserialize-javascriptfix)"overrides": { "minimatch": "^9.0.7" }to the monorepo root to fix GHSA-3ppc-4f35-3m26, GHSA-7r86-cg39-jmmj, GHSA-23c5-xmqv-rm74 (minimatch ReDoS via@typescript-eslint@^6)Details
serialize-javascript (GHSA-5c6j-r48x-rmvq / GHSA-qj8w-gfj5-8c6v)
copy-webpack-plugin@<=13andimage-minimizer-webpack-plugin@<=4both depend onserialize-javascript@<=7.0.4, which has an RCE viaRegExp.flagsand a CPU exhaustion DoS via crafted array-like objects. The fix isserialize-javascript@7.0.5, which is pulled in by the major version bumps to both webpack plugins.minimatch ReDoS (GHSA-3ppc-4f35-3m26 / GHSA-7r86-cg39-jmmj / GHSA-23c5-xmqv-rm74)
@typescript-eslint@^6(a direct dependency of this toolkit) usesminimatch: ^9.0.3, which resolves into the vulnerable range9.0.0–9.0.6. All three ReDoS CVEs are patched inminimatch@9.0.7. Adding"overrides": { "minimatch": "^9.0.7" }to the monorepo root pins the transitive dep to9.0.9without requiring a major @typescript-eslint or ESLint upgrade.The long-term fix is upgrading to
@typescript-eslint@8+ ESLint v10, tracked upstream in WordPress/gutenberg#64782.Test plan
npm auditand confirm noserialize-javascript, no minimatch CVEs in the vulnerable rangesnpm run buildinpackages/toolkitto confirm webpack plugins still worknpm run testto confirm no regressions🤖 Generated with Claude Code