{"id":"GHSA-9r27-994c-4xch","aliases":["GHSA-9r27-994c-4xch"],"related":[],"kind":"vulnerability","state":"published","title":"discord-html not escaping HTML code blocks when lacking a language identifier","summary":"### Impact\nAny website using discord-markdown with user-generated markdown is vulnerable to having code injected into the page where the markdown is displayed.\n\n### Patches\nThis has been patched in version 2.3.1\n\n### Workarounds\nEscape the characters `&lt;&gt;&amp;` before sending plain code blocks to discord-markdown.\n\n### References\nhttps://github.com/brussell98/discord-markdown/issues/13","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"### Impact\nAny website using discord-markdown with user-generated markdown is vulnerable to having code injected into the page where the markdown is displayed.\n\n### Patches\nThis has been patched in version 2.3.1\n\n### Workarounds\nEscape the characters `&lt;&gt;&amp;` before sending plain code blocks to discord-markdown.\n\n### References\nhttps://github.com/brussell98/discord-markdown/issues/13","format":"markdown","source":"ghsa"}],"published":"2020-02-24T17:34:02.000Z","modified":"2020-02-21T20:20:53.000Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.3.1"}],"ecosystem":"npm","package":"discord-markdown","purl":"pkg:npm/discord-markdown","source":"ghsa"}],"references":[{"url":"https://github.com/brussell98/discord-markdown/security/advisories/GHSA-9r27-994c-4xch","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/brussell98/discord-markdown/issues/13","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/brussell98/discord-markdown/commit/7ce2eb66520815dcf5e97ef2bc8a2d5979da66e7","tags":["web"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9r27-994c-4xch","url":"https://github.com/advisories/GHSA-9r27-994c-4xch","licence":"CC-BY-4.0","modified":"2020-02-21T20:20:53.000Z"}],"updatedAt":"2026-11-25T22:56:44.967Z"}