# CVE-2021-39199: Cross site scripting via unsafe defaults in remark-html

- Severity: Critical 10.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.07%, higher than 65% of CVEs (2026-12-01)
- Published: 2021-09-07T18:50:11.000Z
- Modified: 2026-07-08T06:28:59.698Z
- Also known as: GHSA-9q5w-79cv-947m
- Weaknesses: CWE-79
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- remarkjs remark-html: >= 14.0.0, < 14.0.1; < 13.0.2
- remark-html (npm): before 13.0.2; from 14.0.0 before 14.0.1
- remark remark-html: before 13.0.2; from 14.0.0 before 14.0.1

## Every score

- GitHub_M: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`
- GitHub: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/remarkjs/remark-html/security/advisories/GHSA-9q5w-79cv-947m> (patch, third-party-advisory, web)
- <https://github.com/remarkjs/remark-html/commit/b75c9dde582ad87ba498e369c033dc8a350478c1> (patch, third-party-advisory, web)
- <https://github.com/remarkjs/remark-html/releases/tag/14.0.1> (patch, release-notes, third-party-advisory, web)
- <https://www.npmjs.com/package/remark-html> (product, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-39199> (advisory)
- <https://github.com/remarkjs/remark-html> (package)

## Sources

- CVE List: [CVE-2021-39199](https://www.cve.org/CVERecord?id=CVE-2021-39199), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-9q5w-79cv-947m](https://github.com/advisories/GHSA-9q5w-79cv-947m), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-39199](https://nvd.nist.gov/vuln/detail/CVE-2021-39199), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-39199 · Whole record: https://cve.day/CVE-2021-39199.json · Rebuilt by cve.day 2026-11-25T22:58:03.693Z
