/

CVE-2026-94488

Severity:

HIGH RISK

(8.2)

Stored Cross-Site Scripting (CWE-79) in Telegram Exporter

CVE-2026-94488

Awaiting Analysis

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79

Impact:

Client-Side Code Execution

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Telegram Desktop contains a cross-site scripting vulnerability in its HTML exporter, where message content may be incorporated into exported HTML without adequate neutralization. Exploitation requires a victim to use HTML export and may allow attacker-controlled script content to execute when the resulting document is rendered.

Affected context

The vulnerability occurs in Telegram Desktop's HTML export functionality, specifically during processing of button text in the HTML export component. Risk is present when attacker-controlled message content can reach an export operation and the resulting HTML is subsequently rendered in a context where script execution is possible. A malicious message may be forwarded into a group by a member, even when the original author is not a member of that group.

Exploit preconditions

  • Attack surface: Telegram Desktop's HTML export functionality
  • Required access: Ability to place or forward attacker-controlled content into a conversation that may be exported
  • Victim interaction: A victim must perform an HTML export and render or open the resulting document
  • Trigger point: Processing of message button text during HTML generation
  • Why exploitation is possible: Insufficient output encoding can allow message-derived content to be interpreted as active HTML or script rather than inert text

Why this happens

The underlying bug is improper neutralization of user-controlled data before it is inserted into generated HTML. In the affected export path, button text is converted and emitted without consistently applying context-appropriate HTML escaping. This maps to CWE-79, in which untrusted content can alter the structure of a web document and cause script-capable markup to be interpreted by a renderer.

Potential impact

  • Arbitrary script content may execute in the context used to render the exported HTML
  • Sensitive information available to that rendering context could be exposed
  • User actions or displayed content could be manipulated
  • The exported document could be used as a vehicle for phishing or further social engineering
  • Local workflow integrity may be affected when exported files are opened or shared

General mitigation guidance

Mitigation generally focuses on treating all message-derived values as

untrusted output data and applying context-aware encoding before HTML

generation.

Common defensive patterns include:

  • Escaping text for the exact HTML context in which it is inserted
  • Using safe templating or DOM construction APIs instead of string concatenation
  • Allowing rich markup only through a narrowly defined, sanitized allowlist
  • Separating plain-text export from intentionally formatted HTML export
  • Applying restrictive browser or document security policies where feasible
  • Limiting access to sensitive resources from exported-document rendering contexts
  • Avoiding implicit trust in forwarded messages, group content, or locally generated files

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying unescaped data flowing into HTML sinks
  • Code review checks for string concatenation in HTML exporters and templates
  • Tests using representative special-character and markup-bearing content
  • Review of encoding behavior for text, attribute, URL, and script contexts
  • Policy enforcement requiring centralized output-encoding utilities
  • Automated security review tools that trace message content into document-generation paths

Sources

SourceLink
expatch.comexpatch.com/writeups/telegram-html-export-xss.html
github.comgithub.com/telegramdesktop/tdesktop/blob/v6.9.3/Telegram/SourceFiles/export/output/export_output_html.cpp
github.comgithub.com/telegramdesktop/tdesktop/commit/52c779bffa8dde3c5c09826add2607328fae0924
github.comgithub.com/telegramdesktop/tdesktop/commit/8457d13aa795fadf99c955d2a04f00ebc3c59df9
github.comgithub.com/telegramdesktop/tdesktop/releases/tag/v6.9.4
thehackernews.comthehackernews.com/2026/09/telegram-desktop-flaw-lets-hidden.html

Frequently asked

questions

It can be initiated through attacker-controlled message content, but exploitation

is not completed solely by sending a message. A victim must use Telegram

Desktop's HTML export and render the resulting document in a script-capable

context.

Not necessarily. The described behavior permits a message to be forwarded into

a group by a member, so the original message author does not have to be a

member of that group.

Encode all untrusted values according to their output context before inserting

them into HTML, and sanitize any intentionally supported markup with a strict

allowlist.

Treat messages and forwarded content as untrusted, centralize output encoding,

test every export path with adversarial content, and require security review

for code that converts application data into executable document formats.

Find out what's already
exploitable in your codebase.