CVE-2019-16772: regular expressions Cross-Site Scripting (XSS) vulnerability in serialize-to-js
The serialize-to-js NPM package before version 3.0.1 is vulnerable to Cross-site Scripting (XSS). It does not properly mitigate against unsafe characters in serialized regular expressions. This vulnerability is not affected on Node.js environment since Node.js's implementation of RegExp.prototype.toString() backslash-escapes all forward slashes in regular expressions. If serialized data of regular expression objects are used in an environment other than Node.js, it is affected by this vulnerability.
Other sources
Versions of serialize-to-js prior to 3.0.1 are vulnerable to Cross-Site Scripting (XSS). The package fails to sanitize serialized regular expressions. This vulnerability does not affect Node.js applications.
Recommendation
Upgrade to version 3.0.1 or later.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2019-16772?
CVE-2019-16772 has been classified as a medium severity vulnerability due to its potential impact on web applications through Cross-site Scripting (XSS).
How do I fix CVE-2019-16772?
To remediate CVE-2019-16772, you should upgrade the serialize-to-js package to version 3.0.1 or later.
What type of vulnerability is CVE-2019-16772?
CVE-2019-16772 is a Cross-site Scripting (XSS) vulnerability affecting the serialize-to-js NPM package.
Which software is affected by CVE-2019-16772?
CVE-2019-16772 affects the serialize-to-js NPM package versions prior to 3.0.1.
Does CVE-2019-16772 affect the Node.js environment?
No, CVE-2019-16772 does not affect the Node.js environment due to its unique implementation of regular expressions.