Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTlyMjctOTk0Yy00eGNo

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

https://github.com/brussell98/discord-markdown/issues/13

Permalink: https://github.com/advisories/GHSA-9r27-994c-4xch
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTlyMjctOTk0Yy00eGNo
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: about 4 years ago
Updated: over 1 year ago


Identifiers: GHSA-9r27-994c-4xch
References: Repository: https://github.com/brussell98/discord-markdown
Blast Radius: 0.0

Affected Packages

npm:discord-markdown
Dependent packages: 13
Dependent repositories: 73
Downloads: 2,685 last month
Affected Version Ranges: < 2.3.1
Fixed in: 2.3.1
All affected versions: 1.0.0, 2.0.0, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.3.0
All unaffected versions: 2.3.1, 2.4.0, 2.4.1, 2.4.2, 2.5.0, 2.5.1