CVE-2026-54681 DiscordChatExporter: HTML attribute injection via unescaped emoji name in HTML export
Attackers can inject HTML attributes via unescaped emoji names in DiscordChatExporter HTML exports, leading to script execution when users open the file.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-54681?
CVE-2026-54681 is a medium-severity cross-site scripting vulnerability in Tyrrrz DiscordChatExporter, published on 21 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
DiscordChatExporter saves Discord chat logs to a file. Prior to 2.47.2, the VisitEmojiAsync method in DiscordChatExporter.Core/Exporting/HtmlMarkdownVisitor.cs interpolates emoji.Name into the alt attribute and emoji.Code into the title attribute without HTML entity encoding. This affects HTML exports regardless of the markdown setting. Discord's current custom emoji name validation normally excludes attribute-breaking characters, but tampered offline input, a relaxed upstream validation rule, or another future metadata source can inject an HTML attribute and execute script when a user opens the export. This issue is fixed in version 2.47.2.
Weakness: CWE-79
Which versions are affected by CVE-2026-54681?
How do I fix CVE-2026-54681?
No fix has been published for CVE-2026-54681 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-54681 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54681 exists.
Sources
Also known as GHSA-r7qm-wg9p-pjfc.