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.
Published: 2026-08-21
Score: 4.1 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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 yet.

History

Fri, 21 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 21 Aug 2026 19:00:00 +0000

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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-21T19:04:42.235Z

Reserved: 2026-06-15T22:53:58.561Z

Link: CVE-2026-54681

cve-icon Vulnrichment

Updated: 2026-08-21T19:04:17.611Z

cve-icon NVD

Status : Received

Published: 2026-08-21T19:17:03.457

Modified: 2026-08-21T20:16:37.347

Link: CVE-2026-54681

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-21T20:30:07Z

Weaknesses
  • CWE-79

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