Telegram Desktop Bug Deletes Up to 800 GB of User Data on Windows Due to Spellcheck Library Error

A critical configuration flaw in Telegram Desktop for Windows caused the application to recursively delete the entire contents of the C:\custom directory, resulting in the loss of approximately 800 GB of user data including programs, projects, and personal files. The issue originated in the lib_spellcheck library introduced in version 7.1.0, where an empty working directory path was concatenated with /custom and resolved by Qt into an absolute system path. Instead of locating a dictionary file, the code invoked removeRecursively() on the discovered directory, systematically erasing all accessible files while leaving folder structures intact. The bug affected only Windows builds with the built-in spellchecker enabled and remained in distribution for roughly 66 hours across versions 7.1.0 and 7.1.1. Researchers confirmed the behavior using Process Monitor logs and reported it via ticket #31170, prompting developers to add path validation before the function call and disable dictionary operations on empty paths. The corrected code was released in Telegram Desktop 7.1.2, and users running the vulnerable versions are advised to update immediately. No impact was observed on Linux or macOS platforms.

AntiMalwareTranslated from Russian

Read at source

A dangerous configuration error in Telegram Desktop for Windows led to the recursive deletion of nearly 800 GB of user data stored in the C:\custom directory. Home users reported that executable files began disappearing while folder structures remained, gradually emptying entire project and application directories.

The root cause was traced to the lib_spellcheck library responsible for handling user-added dictionary words in a file named custom. Following changes in version 7.1.0, the Windows code passed an empty path string to the spellchecker; Qt then appended /custom, resolving it to the absolute path C:\custom. When the library encountered a directory instead of the expected dictionary file, it executed removeRecursively(), systematically deleting all accessible contents.

Analysis with Process Monitor confirmed that Telegram Desktop was opening the path, traversing subdirectories, and requesting deletion rights without any malicious intent or updater malfunction. The flaw was limited to Windows builds containing the integrated spellchecker and existed in versions 7.1.0 and 7.1.1 for approximately 66 hours.

The researcher virtual-anvil submitted detailed logs and opened ticket #31170. Developers acknowledged the issue, implemented fixes that ensure the path is validated before the function is called and that the library is blocked from operating on an empty address, and released the corrected build in Telegram Desktop 7.1.2. Affected Windows users are strongly recommended to update without delay.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in Vulnerabilities & Exploits

Telegram for Android Patches Voice Call Vulnerability Enabling Code Execution
Yandex Patches Millions of Stations After eMudhra Certificate Keys Compromised
Cisco ASA and FTD Face DoS Vulnerability in SSL VPN Already Exploited in the Wild