CVE-2019-16769 Affected versions of serialize-javascript are vulnerable to Cross-site Scripting (XSS)
An attacker can inject malicious scripts via serialized regular expressions in non-Node.js environments, leading to cross-site scripting attacks.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2019-16769?
CVE-2019-16769 is a medium-severity cross-site scripting vulnerability in yahoo serialize-javascript, published on 5 Dec 2019. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
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.
Weakness: CWE-79
Which versions are affected by CVE-2019-16769?
2 open source packages ship an affected version, including serialize-javascript. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
serialize-javascript npm | All versions | 2.1.1 |
serialize-javascript npm | All versions | 2.1.1 |
Products include Verizon Serialize-Javascript.
How do I fix CVE-2019-16769?
Upgrade serialize-javascript to 2.1.1 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2019-16769 being exploited?
There is no known exploitation of CVE-2019-16769 in the wild and no public exploit code.
Other vulnerabilities in yahoo serialize-javascript
Sources
Also known as CLSA-2026-1774398069, GHSA-h9rv-jmmf-4pgx, ROOT-APP-NPM-CVE-2019-16769.