Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsTraining
StudyProjectsNewsletterHire MeAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Training
Study
Projects
Newsletter
Hire Me
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

2831+ Articles
167+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Checklists
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. News
  3. Telegram Desktop Flaw Let Hidden JavaScript Exfiltrate Exported Chats
Telegram Desktop Flaw Let Hidden JavaScript Exfiltrate Exported Chats
NEWS

Telegram Desktop Flaw Let Hidden JavaScript Exfiltrate Exported Chats

A patched Telegram Desktop bug let attackers hide JavaScript inside chat messages that activated when victims opened HTML exports of their chats.

Dylan H.

News Desk

September 14, 2026
3 min read

Hidden Scripts in Ordinary-Looking Messages

Telegram Desktop had a critical flaw in its HTML export feature: button text inside a message wasn't properly escaped, allowing an attacker-controlled bot to embed a hidden script tag that would execute the moment a victim opened an exported chat file in a web browser.


How the Attack Worked

A malicious bot could embed a script tag inside a message's button text, padding it with invisible characters so the button appeared blank inside the Telegram app itself. If that message was forwarded into a group chat, it would persist quietly in the chat history — potentially for months — until someone exported that conversation to HTML. Opening the resulting export file in a browser would trigger the hidden script automatically, with no further interaction from the victim required.


What the Injected Script Could Do

CapabilityDescription
Data exfiltrationExtract all messages, sender names, timestamps, and chat metadata from the export
Remote exfiltrationSend the stolen data to an attacker-controlled server
Content spoofingModify the exported page — researchers demonstrated a fake Telegram verification form
History tamperingAlter displayed dates, senders, or message text within the exported file

Discovery and Disclosure

The flaw was identified by ExPatch researchers Denis and Aleksander Rostilov, who reported it to Telegram on June 3, 2026, and rated it 8.2 out of 10 on the CVSS 3.1 scale. No CVE identifier was assigned, and Telegram declined the researchers' request for coordinated public disclosure alongside the patch.


Patch Status

Telegram fixed the issue in Desktop version 7.0.1, released July 14, 2026 — despite the underlying bug having existed since March 2024. Critically, the fix does not retroactively sanitize HTML files that were already exported before the patch. Any export generated with a pre-7.0.1 client remains vulnerable if opened today.


Recommendations

  1. Update Telegram Desktop to version 7.0.1 or later immediately
  2. Re-export any chats you need in HTML format after updating, rather than reusing old export files
  3. Disable JavaScript in your browser before opening any HTML export created before July 2026
  4. Treat old exports as untrusted — do not open them in a browser with an active session to sensitive accounts

References

  • The Hacker News — Telegram Desktop Flaw Lets Hidden JavaScript Exfiltrate Messages From HTML Exports

Related Reading

  • Hackers Hijack HBO Max Reddit Account to Push ClickFix Malware Ads
  • WordPress Adds Automated Plugin Reviews to Block High-Risk Updates
#Telegram#XSS#Security Updates#Desktop Applications

Related Articles

Building Desktop Apps with Electron and Next.js

Create cross-platform desktop applications by combining Electron for native capabilities with Next.js for the UI. Covers IPC communication, system tray,...

5 min read

Critical Zimbra Flaw Could Let Crafted Emails Run Malicious Code in User Sessions

A critical stored XSS vulnerability in Zimbra's Classic Web Client allows attackers to deliver specially crafted emails that execute arbitrary code within...

4 min read

Telegram Investigating Claims of 30 Million User Data Breach

Telegram is investigating claims that a threat actor is selling data from 30 million users. The company denies any breach of its systems while the...

3 min read
Back to all News