CVE-2021-39199 json
Cross site scripting via unsafe defaults in remark-html
published 2021-09-07 5 y ago modified 2026-07-08 4 mo ago also GHSA-9q5w-79cv-947m , EUVD-2021-2027
- cvss
- 10.0
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.1%
- EPSS 1.1% chance of exploitation in 30 days, percentile 65%
- public exploits
- 0
- none known
Summary
remark-html is an open source nodejs library which compiles Markdown to HTML. In affected versions the documentation of remark-html has mentioned that it was safe by default. In practice the default was never safe and had to be opted into. That is, user input was not sanitized. This means arbitrary HTML can be passed through leading to potential XSS attacks. The problem has been patched in 13.0.2 and 14.0.1: `remark-html` is now safe by default, and the implementation matches the documentation. On older affected versions, pass `sanitize: true` if you cannot update.
Patch / fix
- npm remark-html 13.0.2, 14.0.1
- remark remark-html 13.0.2, 14.0.1
Exploit prediction
1.07% chance of exploitation in the next 30 days, higher than 65% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 10.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N |
| 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 | 10.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | remark-html | <13.0.2 >=14.0.0, <14.0.1 |
13.0.2 14.0.1 |
Affected products
- remarkjs remark-html
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/remarkjs/remark-html/commit/b75c9dde582ad87ba498e369c033dc8a350478c1
web, patch, third-party-advisory
-
github.com
/remarkjs/remark-html/security/advisories/GHSA-9q5w-79cv-947m
web, patch, third-party-advisory
-
github.com
/remarkjs/remark-html/releases/tag/14.0.1
web, patch, release-notes, third-party-advisory
-
npmjs.com
/package/remark-html
web, product, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-39199
advisory
-
github.com
/remarkjs/remark-html
package
Sources
- CVE List CVE-2021-39199
- GitHub Advisory GHSA-9q5w-79cv-947m
- NVD CVE-2021-39199
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.