{"id":"CVE-2019-16772","published":"2019-12-06T23:25:14Z","modified":"2024-08-05T01:24:48Z","title":"regular expressions Cross-Site Scripting (XSS) vulnerability in serialize-to-js","vendor":"commenthol","product":"serialize-to-js","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.1,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00646,"percentile":0.51914,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/commenthol/serialize-to-js/security/advisories/GHSA-3fjq-93xj-3f3f","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/commenthol/serialize-to-js/commit/181d7d583ae5293cd47cc99b14ad13352875f3e3","tags":["x_refsource_MISC"]}],"priority":{"score":12.6,"factors":[{"name":"EPSS percentile","points":10.38},{"name":"CVSS severity","points":2.17}]},"vendorSlug":"commenthol","affectedVersions":[{"vendor":"commenthol","product":"serialize-to-js","versions":[">= < 3.0.1, < 3.0.1"]}],"affected":[{"ecosystem":"npm","package":"serialize-to-js","vulnerableRanges":["<3.0.1"],"patched":["3.0.1"],"from":["GHSA-3fjq-93xj-3f3f"],"provenance":"source"}],"summary":{"text":"The serialize-to-js NPM package from commenthol, before version 3.0.1, fails to neutralise unsafe characters in serialized regular expressions, leaving it open to cross-site scripting. The flaw does not affect Node.js, whose RegExp.prototype.toString() escapes forward slashes, but it does affect serialized regular expression data consumed in other JavaScript environments.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:55:31Z"},"euvd":{"id":"EUVD-2019-0772","exploited":false,"provenance":"source"}}