{"id":"CVE-2021-39199","published":"2021-09-07T18:50:11Z","modified":"2024-08-04T01:58:18Z","title":"Cross site scripting via unsafe defaults in remark-html","vendor":"remarkjs","product":"remark-html","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":10,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01075,"percentile":0.6578,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/remarkjs/remark-html/security/advisories/GHSA-9q5w-79cv-947m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/remarkjs/remark-html/commit/b75c9dde582ad87ba498e369c033dc8a350478c1","tags":["x_refsource_MISC"]},{"url":"https://github.com/remarkjs/remark-html/releases/tag/14.0.1","tags":["x_refsource_MISC"]},{"url":"https://www.npmjs.com/package/remark-html","tags":["x_refsource_MISC"]}],"priority":{"score":20.2,"factors":[{"name":"EPSS percentile","points":13.16},{"name":"CVSS severity","points":7.0}]},"vendorSlug":"remarkjs","affectedVersions":[{"vendor":"remarkjs","product":"remark-html","versions":[">= 14.0.0, < 14.0.1","< 13.0.2"]}],"affected":[{"ecosystem":"npm","package":"remark-html","vulnerableRanges":["<13.0.2",">=14.0.0, <14.0.1"],"patched":["13.0.2","14.0.1"],"from":["GHSA-9q5w-79cv-947m"],"provenance":"source"}],"summary":{"text":"The remark-html Node.js library, which compiles Markdown to HTML, has an unsafe default in which user input is not sanitized, so arbitrary HTML passes through unless the sanitize option is enabled. An attacker who can supply Markdown that the library processes can inject script for cross-site scripting, with no authentication or user interaction required and only the default configuration needed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:13:42Z"},"euvd":{"id":"EUVD-2021-2027","exploited":false,"provenance":"source"}}