A stored cross-site scripting flaw in Telegram Desktop allowed malicious bot inline-keyboard button text to be written unescaped into HTML chat exports. Attackers could forward a poisoned bot message into a target chat without joining it; if a recipient later exported that chat and opened the HTML file in a JavaScript-enabled browser, the embedded payload could execute, exfiltrating rendered messages and metadata, revealing the local export path, altering displayed conversations, or presenting phishing-style verification forms.
The flaw affected Telegram Desktop versions 4.15.1 through 6.9.3 and was reported by ExPatch researchers Denis Rostilov and Aleksander Rostilov on June 3. Telegram added sanitization in version 6.9.4 beta and released the stable fix in version 7.0.1, but exports generated by vulnerable clients remain dangerous: organizations should regenerate affected archives or treat them as untrusted and open them with JavaScript disabled. Researchers reported no evidence of in-the-wild exploitation, and no CVE or official Telegram advisory had been issued.

See affected versions and whether adversaries are exploiting it.
8 events from the most recent confirmed update back to the earliest known activity.
After the fix shipped, ExPatch published its writeup describing the Telegram Desktop HTML-export XSS; the researchers said they tested only their own accounts and test groups and found no evidence of exploitation against real users.
Telegram released version 7.0.1, the first stable Telegram Desktop release containing the fix for unescaped inline-keyboard button text in HTML exports.
Telegram Desktop 6.9.4 beta was released with the HTML-export escaping fix, making it the first beta version containing the remediation.
Telegram confirmed ExPatch's vulnerability report and offered the researchers a $500 bug bounty, which they declined and asked to be donated to charity.
ExPatch researchers Denis Rostilov and Aleksander Rostilov reported the stored XSS flaw to Telegram with a proof of concept and video demonstration.
Telegram applied escaping via the SerializeString() sanitization function to inline-keyboard button text, fixing the export injection issue and a separate onclick-handler injection issue.
The vulnerable HTML-export behavior reached stable Telegram Desktop in version 4.15.1, exposing inline-button text to stored XSS in exported chat files.
The HTML export code that wrote bot inline-keyboard button text into output without proper escaping was introduced in February 2024.
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
5 references tracked. Mallory keeps watching after this page renders.
cryptika.com
Open sourcesecurityaffairs.com
Open sourcethehackernews.com
Open sourcegithub.com
Open sourceexpatch.com
Open sourceMap indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.