CVE-2019-16772
MEDIUM 6.1CVSS 3.1Cross-Site Scripting 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.
- Published
- 7 Dec 2019
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- GHSA-3fjq-93xj-3f3f
- Sources
- NVDJSONOSV GHSA-3fjq-93xj-3f3fJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | LOW 3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L |
| OSV | GitHub | CVSS 3.1 | LOW 3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | serialize-to-js_project | serialize-to-jscpe:2.3:a:serialize-to-js_project:serialize-to-js:*:*:*:*:*:node.js:*:* |
< 3.0.1 | 3.0.1 |
| OSV | npm | serialize-to-js | < 3.0.1 | 3.0.1 |
References
- https://github.com/commenthol/serialize-to-js/commit/181d7d583ae5293cd47cc99b14ad13352875f3e3 · Patch, Third Party Advisory, WEB
- https://github.com/commenthol/serialize-to-js/security/advisories/GHSA-3fjq-93xj-3f3f · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2019-16772 · ADVISORY
- https://github.com/advisories/GHSA-3fjq-93xj-3f3f · ADVISORY
- https://www.npmjs.com/advisories/1429 · WEB
History
- 25 Nov 2026 20:31 UTC · NVD: first stored (published 7 Dec 2019)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 6 Dec 2019)