Telegram Desktop Flaw Lets Hidden JavaScript Exfiltrate Messages From HTML Exports
Sep 14, 2026
Vulnerability / Data Security
A flaw in Telegram Desktop let a bot's message plant hidden JavaScript inside chats that users exported to HTML files, security researchers at ExPatch said in a writeup published on September 12. In Telegram, the message looked ordinary, with a link button, and the script ran only when someone opened the export file in a web browser. It could then copy every message in that file to an attacker-controlled server, or rewrite what the page displayed. Telegram shipped a fix in July, but the app update does not update files exported with earlier versions, so old HTML exports can still carry the script. Telegram Desktop, Telegram's app for Windows, macOS, and Linux, can save a single chat or all chats from an account as HTML pages that open in a browser. Bots can attach rows of buttons under their messages, which Telegram calls inline keyboards, and the bot chooses the text shown on each button. Until the fix, the export code wrote that button text directly ...