fix: resolve serialize-javascript security vulnerability (CVE)#14735
Merged
fix: resolve serialize-javascript security vulnerability (CVE)#14735
Conversation
- Add serialize-javascript@^7.0.3 to yarn resolutions - Fixes Dependabot alert #188 - Addresses code injection vulnerability in serialize-javascript <= 7.0.2 - All tests passing with the updated dependency
|
osama-rizk
approved these changes
Mar 2, 2026
adrianjoshua-strutt
approved these changes
Mar 2, 2026
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.
Description of changes
This PR resolves a security vulnerability by forcing all packages to use serialize-javascript@7.0.3 via yarn resolutions.
Why not upgrade the parent dependencies?
The vulnerable version is introduced as a transitive dependency through:
@size-limit/webpack@8.2.6→terser-webpack-plugin@5.3.16→serialize-javascript@^6.0.2@size-limit/webpack-why@8.2.6→terser-webpack-plugin@5.3.16→serialize-javascript@^6.0.2webpack@5.104.1→terser-webpack-plugin@5.3.16→serialize-javascript@^6.0.2Upgrading these parent dependencies is not viable because:
serialize-javascript@^6.0.2(no v6 exists)Using yarn resolutions is the recommended approach as it:
Issue #, if available
Fixes Dependabot alert #188
Description of how you validated changes
yarn installto apply the resolutioncat node_modules/serialize-javascript/package.json | grep versionyarn why serialize-javascriptyarn build- completed successfullyyarn test- all tests passingChecklist
yarn testpassesChecklist for repo maintainers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.