CVE-2019-16772 json
regular expressions Cross-Site Scripting (XSS) vulnerability in serialize-to-js
published 2019-12-06 6 y ago modified 2026-07-08 4 mo ago also GHSA-3fjq-93xj-3f3f , EUVD-2019-0772
- cvss
- 3.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 51%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm serialize-to-js 3.0.1
- commenthol serialize-to-js 3.0.1
Exploit prediction
0.65% chance of exploitation in the next 30 days, higher than 51% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | serialize-to-js | <3.0.1 |
3.0.1 |
Affected products
- commenthol serialize-to-js
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/commenthol/serialize-to-js/commit/181d7d583ae5293cd47cc99b14ad13352875f3e3
web, patch, third-party-advisory
-
github.com
/commenthol/serialize-to-js/security/advisories/GHSA-3fjq-93xj-3f3f
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2019-16772
advisory
-
github.com
/advisories/GHSA-3fjq-93xj-3f3f
advisory
-
npmjs.com
/advisories/1429
web
Sources
- CVE List CVE-2019-16772
- GitHub Advisory GHSA-3fjq-93xj-3f3f
- NVD CVE-2019-16772
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.