Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-39199

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-39199
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:53 UTC · Revision 1

Source evidence

CVE-2021-39199

core-osv · Original source

Published 7 Sept 2021, 19:15 UTC

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.

osv:CVE-2021-39199
Complete source record
{
  "id": "54101067c187ace06f8a1a755fa04b9bb0a758d74880b658895c3e894df58c98",
  "url": "https://osv.dev/vulnerability/CVE-2021-39199",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-39199",
    "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.",
    "evidence": "osv:CVE-2021-39199",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-39199",
      "aliases": [
        "CVE-2021-39199",
        "GHSA-9q5w-79cv-947m"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/remarkjs/remark-html",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2133d209ab423ead9c6360ab93850f03a1101d8a"
                },
                {
                  "introduced": "3507d999707d8cacb941c6f5e2eb501fb17c7a24"
                },
                {
                  "fixed": "ac80e5f221b48f476a2a3dd1e4885a8faa9791e7"
                },
                {
                  "fixed": "b75c9dde582ad87ba498e369c033dc8a350478c1"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:remark:remark-html:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "13.0.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:remark:remark-html:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "14.0.0"
                      },
                      {
                        "fixed": "14.0.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "b75c9dde582ad87ba498e369c033dc8a350478c1"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "ac80e5f221b48f476a2a3dd1e4885a8faa9791e7"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "14.0.1"
                  }
                ]
              }
            }
          ],
          "versions": [
            "13.0.1",
            "14.0.0",
            "13.0.0",
            "12.0.0",
            "11.0.2",
            "11.0.1",
            "11.0.0",
            "10.0.0",
            "9.0.1",
            "9.0.0",
            "8.0.0",
            "7.0.0",
            "6.0.1",
            "6.0.0",
            "5.2.0",
            "5.1.0",
            "5.0.1",
            "5.0.0",
            "4.0.0",
            "3.0.1",
            "3.0.0",
            "2.0.2",
            "2.0.1",
            "2.0.0",
            "1.2.1",
            "1.2.0",
            "1.1.0",
            "1.0.0",
            "0.1.1",
            "0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-39199.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:53.928599791Z",
      "provider": "osv",
      "references": [
        "https://www.npmjs.com/package/remark-html",
        "https://github.com/remarkjs/remark-html/commit/b75c9dde582ad87ba498e369c033dc8a350478c1",
        "https://github.com/remarkjs/remark-html/releases/tag/14.0.1",
        "https://github.com/remarkjs/remark-html/security/advisories/GHSA-9q5w-79cv-947m"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-39199",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 386414,
  "published_at": "2021-09-07T19:15:08.747+00:00"
}