Skip to content

Pin serialize-javascript to ^7.0.5 via npm overrides#228

Merged
chloe41427[bot] merged 1 commit into
mainfrom
fix/serialize-javascript-cve
Jun 11, 2026
Merged

Pin serialize-javascript to ^7.0.5 via npm overrides#228
chloe41427[bot] merged 1 commit into
mainfrom
fix/serialize-javascript-cve

Conversation

@chloe41427

@chloe41427 chloe41427 Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolves the serialize-javascript advisory (GHSA-76p7-773f-r4q5). Dependabot couldn't apply the fix because three Docusaurus transitive dependencies pin serialize-javascript to ^6.x:

  • copy-webpack-plugin@11.0.0^6.0.0
  • css-minimizer-webpack-plugin@5.0.1^6.0.1
  • terser-webpack-plugin@5.3.16^6.0.2

Adding "overrides": { "serialize-javascript": "^7.0.5" } to package.json forces npm to resolve all three to the patched 7.0.5 regardless of the parent's semver range. Compatibility is safe: the v7 release was a Node engine bump (>=20.0.0), which matches this repo's existing engines.node: >=20.0. The API surface is unchanged.

Test plan

  • npm install resolves serialize-javascript@7.0.5 (verified in package-lock.json)
  • npm run build succeeds end-to-end (preprocessing + docusaurus build, client+server bundles)
  • npm audit no longer flags serialize-javascript (remaining 20 moderate findings all chain through uuid, unrelated to this CVE)

Resolves GHSA-76p7-773f-r4q5. Three Docusaurus transitive deps
(copy-webpack-plugin, css-minimizer-webpack-plugin, terser-webpack-plugin)
constrain serialize-javascript to ^6.x, blocking Dependabot from picking
up the patched 7.0.5. Forcing the resolution via npm overrides is
compatible because the v7 release is a Node engine bump (>=20) which
matches this repo's engines field.
@chloe41427 chloe41427 Bot merged commit 22eb7c1 into main Jun 11, 2026
2 checks passed
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