Skip to content

fix: patch serialize-javascript RCE and minimatch ReDoS vulnerabilities#484

Open
rickalee wants to merge 2 commits into10up:developfrom
rickalee:fix/security-serialize-javascript
Open

fix: patch serialize-javascript RCE and minimatch ReDoS vulnerabilities#484
rickalee wants to merge 2 commits into10up:developfrom
rickalee:fix/security-serialize-javascript

Conversation

@rickalee
Copy link
Copy Markdown
Contributor

@rickalee rickalee commented Mar 31, 2026

Summary

Details

serialize-javascript (GHSA-5c6j-r48x-rmvq / GHSA-qj8w-gfj5-8c6v)

copy-webpack-plugin@<=13 and image-minimizer-webpack-plugin@<=4 both depend on serialize-javascript@<=7.0.4, which has an RCE via RegExp.flags and a CPU exhaustion DoS via crafted array-like objects. The fix is serialize-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) uses minimatch: ^9.0.3, which resolves into the vulnerable range 9.0.0–9.0.6. All three ReDoS CVEs are patched in minimatch@9.0.7. Adding "overrides": { "minimatch": "^9.0.7" } to the monorepo root pins the transitive dep to 9.0.9 without 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

  • Run npm audit and confirm no serialize-javascript, no minimatch CVEs in the vulnerable ranges
  • Run npm run build in packages/toolkit to confirm webpack plugins still work
  • Run npm run test to confirm no regressions

🤖 Generated with Claude Code

…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-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 31, 2026

🦋 Changeset detected

Latest commit: b2080ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
10up-toolkit Patch

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

@rickalee rickalee requested a review from nicholasio March 31, 2026 18:38
…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).
@rickalee rickalee changed the title fix: bump copy-webpack-plugin and image-minimizer-webpack-plugin for serialize-javascript CVE fix: patch serialize-javascript and minimatch ReDoS CVEs (GHSA-5c6j-r48x-rmvq, GHSA-qj8w-gfj5-8c6v, GHSA-3ppc-4f35-3m26, GHSA-7r86-cg39-jmmj, GHSA-23c5-xmqv-rm74) Mar 31, 2026
@rickalee rickalee changed the title fix: patch serialize-javascript and minimatch ReDoS CVEs (GHSA-5c6j-r48x-rmvq, GHSA-qj8w-gfj5-8c6v, GHSA-3ppc-4f35-3m26, GHSA-7r86-cg39-jmmj, GHSA-23c5-xmqv-rm74) fix: patch serialize-javascript RCE and minimatch ReDoS vulnerabilities Mar 31, 2026
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