CVE-2019-16769: Cross-Site Scripting in serialize-javascript
4.2
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.6028%
CWE
Published
12/5/2019
Updated
1/9/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
serialize-javascript | npm | < 2.1.1 | 2.1.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how RegExp
objects were serialized. The patched commit shows the critical change in the serialization function's RegExp
handling branch (type 'R'). The original implementation used RegExp.prototype.toString()
which outputs literal notation (e.g., /</script>/), creating XSS opportunities when embedded in HTML. The vulnerable function is the main serialize()
entry point that processes this object type, as evidenced by the direct code modification in the RegExp
serialization path.