[APS-18163] fix: resolve serialize-javascript RCE/XSS vulnerability#28
Merged
karanshah-browserstack merged 3 commits intobrowserstack:mainfrom Apr 14, 2026
Conversation
- Add npm overrides for serialize-javascript to resolve CVE-2024-11831 (improper neutralization of input during web page generation / XSS) - Pin browserify-sign and @babel/traverse to secure versions - Regenerate package-lock.json with patched dependency tree Resolves: APS-18163
karanshah-browserstack
approved these changes
Apr 14, 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.
Security Fix: APS-18163\n\n### Issue\n
serialize-javascript< 7.0.3 is vulnerable to CVE-2024-11831 (Improper Neutralization of Input During Web Page Generation / Cross-Site Scripting). This transitive dependency is pulled in by Cypress and other packages in the dependency tree.\n\n### Root Cause\nTheserialize-javascriptpackage (versions < 7.0.3) does not properly sanitize certain inputs when generating JavaScript code, enabling potential XSS attacks through crafted payloads.\n\n### Fix Applied\n- Added\"overrides\"section inpackage.jsonto forceserialize-javascriptto>=7.0.3across the entire dependency tree\n- Pinnedbrowserify-signto^4.2.3and@babel/traverseto^7.23.2to address additional flagged vulnerabilities\n- Regeneratedpackage-lock.jsonto reflect the patched dependency resolution\n\n### Testing\n\nnpm audit: Theserialize-javascriptvulnerability is fully resolved.\n\nBrowserStack Session Sanity (Cypress) -- ALL PASSED:\n\n| Browser/OS | API Status | Session URL |\n|---|---|---|\n| Chrome 136 / Windows 10 |done| Session |\n| Edge 146 / Windows 11 |done| Session |\n| Firefox 149 / OS X Big Sur |done| Session |\n\nAll 3 sessions verified via BrowserStack REST API withstatus: done.\n\n### Jira Ticket\nAPS-18163\n\n### Checklist\n- [x] Security issue addressed (serialize-javascript override to >=7.0.3)\n- [x] BrowserStack Cypress session run and API-verified (3/3 passed)\n- [x] No functional regression -- all Cucumber BDD tests pass on Chrome, Edge, Firefox