Notebookcheck Logo

Security vulnerability in Telegram Messenger's Windows application allowed code execution after clicking on video

A vulnerability has been found in the Windows version of Telegram Messenger (image: created with Dall-E 3).
A vulnerability has been found in the Windows version of Telegram Messenger (image: created with Dall-E 3).
A simple spelling error in the source code of the Telegram Messenger Windows application let attackers bypass a security warning. This enabled the automatic execution of Python scripts after clicking on a link disguised as a video.

The Windows application of the well-known messenger Telegram contains in its source code a list of file extensions for which a security warning is issued when such a file is clicked on. This includes, for example, Windows executable files, for which the Telegram Windows application issues the following warning "This file has the extension .exe. It could damage your computer. Are you sure you want to run it?

Such a dialogue should also appear for executable scripts in the Python programming language with the extension .pyzw. However, a typing error (".pywz" instead of ".pyzw") meant that no warning appeared for Python zip archives, but the code was executed directly after clicking on a link, provided that a Python interpreter was available on the Windows system. If such a Python script is now obfuscated with the file type "video/mp4", for example, the executable will appear as a video in Telegram Messenger.

Server-side workaround already available

In a statement to Bleeping Computer, Telegram's developers said: "There was [...] an issue in Telegram Desktop where the user had to CLICK on a malicious file while the Python interpreter was installed on their computer. Contrary to previous reports, this was not a "zero-click" vulnerability that could only affect a tiny fraction of our users: Less than 0.01% of our users have Python installed and use the corresponding version of Telegram for Desktop".

The typo in the source code on GitHub has already been fixed by the Telegram team, but an updated Windows app with the corrected code is not yet available. However, the developers of the Telegram messenger have also implemented a server-side fix, which means that Python script archives will no longer be executed directly on Windows, even in older versions with the bug in the code, but a warning will be displayed as with EXE files.

Read all 1 comments / answer
static version load dynamic
Loading Comments
Comment on this article
Please share our article, every link counts!
> Expert Reviews and News on Laptops, Smartphones and Tech Innovations > News > News Archive > Newsarchive 2024 04 > Security vulnerability in Telegram Messenger's Windows application allowed code execution after clicking on video
Alexander Pensler, 2024-04-15 (Update: 2024-04-15)