CVE-2019-16769: Affected versions of serialize-javascript are vulnerable to Cross-site Scripting (XSS)
A XSS flaw was found in npm-serialize-javascript. 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
The serialize-javascript npm package before version 2.1.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.
Affected Software
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2019-16769?
CVE-2019-16769 is classified as a high severity vulnerability due to the potential for cross-site scripting (XSS) attacks.
How do I fix CVE-2019-16769?
To fix CVE-2019-16769, update the npm-serialize-javascript package to version 2.1.1 or later.
Which software is affected by CVE-2019-16769?
CVE-2019-16769 affects npm-serialize-javascript versions prior to 2.1.1 and servicemesh-grafana version 0:6.4.3-11.el8 and below.
What is the impact of CVE-2019-16769?
The impact of CVE-2019-16769 includes the possibility of executing malicious scripts in the context of the user's browser.
Is CVE-2019-16769 exploitable in a Node.js environment?
No, CVE-2019-16769 is not exploitable in a Node.js environment due to the secure handling of regular expressions in Node.js's implementation.