CVE-2026-54681

DiscordChatExporter: HTML attribute injection via unescaped emoji name in HTML export

Published Aug 21, 2026 CVSS 3.1 · 4.1 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The exporter injects the raw emoji name into the alt attribute and the emoji code into the title attribute without performing HTML entity encoding. If an emoji name contains characters that break out of the attribute context, an attacker can insert a new attribute or script tag into the resulting HTML file. The current Discord validation prevents most problematic characters, but an offline source or a future metadata change could supply a crafted name, enabling local execution of arbitrary code when the file is opened in a browser or similar environment.

Affected Systems

Tyrrrz's DiscordChatExporter, any build prior to version 2.47.2, regardless of the markdown export option, is affected. Users who process Discord chat history with older releases are at risk.

Risk and Exploitability

The CVSS base score of 4.1 indicates moderate severity, and the EPSS score is not available, so the precise likelihood of exploitation cannot be quantified. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires an attacker to supply a crafted emoji name that is preserved during export; once an HTML file built with the vulnerable code is opened, the injected script executes with the privileges of the viewing user. Because the attack vector can be supplied via tampered offline data, it can be carried out locally without network communication.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade DiscordChatExporter to version 2.47.2 or later, which properly escapes the emoji name and code attributes.
  • If an upgrade is not immediately possible, validate that all emoji names contain only safe characters before exporting and avoid opening exported HTML files from untrusted sources.
  • As a temporary workaround, sanitize the generated HTML output or manually edit any suspicious attributes before viewing the file.

Generated by OpenCVE AI on August 21, 2026 at 20:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Tyrrrz
Tyrrrz discordchatexporter
Vendors & Products Tyrrrz
Tyrrrz discordchatexporter
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title DiscordChatExporter: HTML attribute injection via unescaped emoji name in HTML export
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 4.1, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 21, 2026, 7:04 PM
Reserved
Jun 15, 2026, 10:53 PM
Status
Deferred
Published
Aug 21, 2026, 7:17 PM
Modified
Oct 14, 2026, 7:10 PM