CVE-2019-16772: regular expressions Cross-Site Scripting (XSS) vulnerability in serialize-to-js

Published Dec 6, 2019
·
Updated

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

2 affected componentsFixes available
npm/serialize-to-js<3.0.1
3.0.1
Serialize-to-js Project Serialize-to-js Node.js<3.0.1

Event History

Dec 6, 2019
Advisory Published
11:20 PM
CVE Published
via MITRE·11:25 PM
Data Sourced
via MITRE·11:25 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

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).

2

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.

3

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.

4

Which software is affected by CVE-2019-16772?

CVE-2019-16772 affects the serialize-to-js NPM package versions prior to 3.0.1.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203