Cross site scripting via unsafe defaults in remark-html
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| remarkjs | remark-html | 14.0.0 to before 14.0.1; before 13.0.2 | 14.0.1, 13.0.2 | Patch available | CNA |
| — | remark-html (npm) | before 13.0.2 | 13.0.2 | Patch available | GHSA-9q5w-79cv-947m |
| — | remark-html (npm) | 14.0.0 to before 14.0.1 | 14.0.1 | Patch available | GHSA-9q5w-79cv-947m |
- remark-html Vendorremarkjs Affected 14.0.0 to before 14.0.1; before 13.0.2 Fixed in 14.0.1, 13.0.2 Patch available CNA
- remark-html (npm) Vendor— Affected before 13.0.2 Fixed in 13.0.2 Patch available GHSA-9q5w-79cv-947m
- remark-html (npm) Vendor— Affected 14.0.0 to before 14.0.1 Fixed in 14.0.1 Patch available GHSA-9q5w-79cv-947m
Remediation
- Fix · CNA remark-html (remarkjs) Fixed in 14.0.1, 13.0.2
- Fix · GHSA-9q5w-79cv-947m remark-html (npm) Fixed in 13.0.2 Advisory →
- Fix · GHSA-9q5w-79cv-947m remark-html (npm) Fixed in 14.0.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-39199
- 2026-10-03 Alias added: GHSA-9q5w-79cv-947m
References
Patch 3
Sources
- CVE-2021-39199 · CVE Program
- CVE-2021-39199 · NVD
- FIRST EPSS
- GHSA-9q5w-79cv-947m · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences