discord-html not escaping HTML code blocks when lacking a language identifier
Impact
Any website using discord-markdown with user-generated markdown is vulnerable to having code injected into the page where the markdown is displayed.
Patches
This has been patched in version 2.3.1
Workarounds
Escape the characters <>& before sending plain code blocks to discord-markdown.
References
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | discord-markdown | < 2.3.1 | 2.3.1 |
References
- Weakness (CWE)
-- Platform
- npm
- Package
discord-markdown- Disclosed
- 24.02.2020
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-9r27-994c-4xch - CC BY 4.0
Vulnerability history: discord-markdown
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.