---
id: CVE-2026-54681
title: DiscordChatExporter saves Discord chat logs to a file
summary: >-
  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 …
severity: medium
cvss: 4.1
cvssVector: 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'
cwe:
  - CWE-79
published: '2026-08-21'
updated: '2026-09-30'
sourceUpdated: '2026-09-30T19:57:08.043'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-54681'
references:
  - url: >-
      https://github.com/Tyrrrz/DiscordChatExporter/commit/f4d1e630f7f27120c3be4320d92cc8b932e78688
    label: security-advisories@github.com
  - url: 'https://github.com/Tyrrrz/DiscordChatExporter/pull/1544'
    label: security-advisories@github.com
  - url: 'https://github.com/Tyrrrz/DiscordChatExporter/releases/tag/2.47.2'
    label: security-advisories@github.com
  - url: >-
      https://github.com/Tyrrrz/DiscordChatExporter/security/advisories/GHSA-r7qm-wg9p-pjfc
    label: security-advisories@github.com
  - url: >-
      https://github.com/Tyrrrz/DiscordChatExporter/security/advisories/GHSA-r7qm-wg9p-pjfc
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
epss: 0.00164
epssPercentile: 0.05044
ingestedAt: '2026-09-30T20:23:19.466Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
