{"id":"GHSA-9r27-994c-4xch","aliases":[],"status":"published","title":"discord-html not escaping HTML code blocks when lacking a language identifier","description":"### 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 `\u0026lt;\u0026gt;\u0026amp;` before sending plain code blocks to discord-markdown.\n\n### References\nhttps://github.com/brussell98/discord-markdown/issues/13","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2020-02-24T17:34:02Z","modified":"2023-01-09T05:02:17Z","fixes":[{"ecosystem":"npm","package":"discord-markdown","fixed_in":["2.3.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"discord-markdown","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.1"}]}]},{"source":"osv","ecosystem":"npm","package":"discord-markdown","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.3.1"}]}]}],"references":[{"url":"https://github.com/brussell98/discord-markdown/security/advisories/GHSA-9r27-994c-4xch","tags":["web"]},{"url":"https://github.com/brussell98/discord-markdown/issues/13","tags":["web"]},{"url":"https://github.com/brussell98/discord-markdown/commit/7ce2eb66520815dcf5e97ef2bc8a2d5979da66e7","tags":["web"]},{"url":"https://github.com/advisories/GHSA-9r27-994c-4xch"}],"sources":{"ghsa":[{"id":"GHSA-9r27-994c-4xch","title":"discord-html not escaping HTML code blocks when lacking a language identifier","description":"### 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 `\u0026lt;\u0026gt;\u0026amp;` before sending plain code blocks to discord-markdown.\n\n### References\nhttps://github.com/brussell98/discord-markdown/issues/13","status":"published","published":"2020-02-24T17:34:02Z","modified":"2023-01-09T05:02:17Z","updated_at":"2026-11-02T14:36:03.040255Z"}],"osv":[{"id":"GHSA-9r27-994c-4xch","title":"discord-html not escaping HTML code blocks when lacking a language identifier","description":"### 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 `\u0026lt;\u0026gt;\u0026amp;` before sending plain code blocks to discord-markdown.\n\n### References\nhttps://github.com/brussell98/discord-markdown/issues/13","status":"published","published":"2020-02-24T17:34:02Z","modified":"2020-02-21T20:20:53Z","updated_at":"2026-11-02T15:46:44.225359Z"}]}}
