Telegram Desktop Flaw Could Let Hidden JavaScript Steal Messages From HTML Exports

· Original article ↗

Summary

A Telegram Desktop export flaw let bot button text inject JavaScript into HTML chat exports, potentially exposing that file’s contents or altering its display when opened in a browser. The issue is fixed; older exports remain risky.

Key points

  • Telegram Desktop failed to escape bot inline-button text in HTML exports, allowing a bot message to embed hidden JavaScript.
  • When a vulnerable export was opened in a browser with JavaScript enabled, the script could read that file’s messages and metadata and send them to an attacker-controlled server.
  • The script could also alter the page’s displayed content, but researchers said it did not change Telegram’s copy of the chat or the saved export file.
  • Exploitation required a pre-fix export containing the message; each export file contained at most 1,000 messages.
  • Researchers said they tested the flaw only on their own accounts and test groups and did not claim it had been used against real users.
  • Telegram fixed the issue in version 7.0.1 stable and 6.9.4 beta; affected stable versions ran from 4.15.1 through 6.9.3.
  • Users should update and recreate older HTML exports, or open them only with JavaScript disabled; pre-fix exports should be treated as untrusted.

Article Details

Vulnerability Types
  • Unescaped bot button text in HTML exports allowed JavaScript injection.
Severity
8.2/10 (CVSS 3.1, rated by the researchers)
Affected Versions
  • Telegram Desktop 4.15.1 through 6.9.3
Exploitation Status
not_reported
Exploit Availability
unknown
Patch Status
available
Workarounds
  • Open pre-fix HTML exports only with JavaScript disabled.
  • After updating, re-export chats that were exported to HTML before the fix.

MITRE ATT&CK

People

Vendors

Products

Related Articles