CVE-2021-39199Remark-html
Medium 6.1 No auth needed
Follow: this CVE · Remark · Remark-html We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 1.1% probability of exploitation in 30 days · percentile 65
- Auth required
- No
- Published
- Sep 7, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
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.
What to do
- Apply the vendor's security update for Remark-html.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | remark-html |
< 13.0.2 |
13.0.2 |
npm install remark-html@13.0.2 |
| npm | remark-html |
≥ 14.0.0 < 14.0.1 |
14.0.1 |
npm install remark-html@14.0.1 |
Per OSV / GitHub Advisories (GHSA-9q5w-79cv-947m). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| remark | remark-html | < 13.0.2 |
| remark | remark-html | ≥ 14.0.0 < 14.0.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Patch Release Notes Third Party Advisory
- github.com Patch Third Party Advisory
- www.npmjs.com Product Third Party Advisory