Telegram Patches HTML Widget Holes as QuickJS Audit Finds 27 Bugs
Two days after Telegram opened HTML widgets to all bots (mini-apps up to 4 KB, embedded directly in a message), V12 published a video showing a widget launching a calculator on Android. Pavel Durov replied that there is no problem and that the scenario is closed on the server. An audit of QuickJS-ng, the JavaScript engine that runs widget code, turned up 27 possible bugs, verified by code review only. Update the client to Android 13.2.2 or Desktop 7.4.3.
AI-processed from Habr AI; edited by Hamidun News
Telegram launched HTML widgets under the slogan "any message can become an app": a bot sends a tiny interactive page of up to 4 KB into a chat, and it runs right inside the message. Two days after widgets opened to all bots, researcher V12 posted a video of such a widget launching a calculator on Android. This is remote code execution (RCE): a third-party script does something on your device that you never authorized.
Shortly after, an audit of QuickJS-ng, the engine that executes JavaScript in widgets, turned up 27 possible bugs. The auditor verified these 27 findings only by reading the source code and did not attempt to reproduce the attacks. For anyone building bots and mini-apps, this is a clear lesson: what breaks when you embed third-party code in a messenger, and how quickly the vendor fixes it.
Timeline of the week
On November 5, Telegram Desktop 7.4.0 shipped, with a single line in the release notes: "HTML widgets in bots." On November 6, the widget engine was updated to version 0.6.1: seven fixes, one of which Telegram itself called "the reported RCE." On November 9, widgets opened to all bots via Bot API 10.4, and the same day the QuickJS-ng audit with 27 findings was published. On November 10, engine v0.6.4 closed five more memory bugs and a second code execution bug found on Android 13.2.1. On November 11, V12's video appeared and Desktop 7.4.2 shipped, and in the early hours of November 13 Moscow time, Desktop 7.4.3 followed.
Pavel Durov responded that the problem does not exist: no one could be compromised just by receiving a message, the user had to launch a third-party bot themselves, and the scenario is now fully closed on the server. The author of the analysis points out the contradiction between "there is no problem" and "it is already fixed" in a single message. The condition that the user must "first launch a bot" limits the scenario but does not eliminate it.
A person can be talked into pressing "Start," for example under the guise of verification to enter a chat, and after that the bot can send a widget with malicious code. This is a possible scenario, not evidence of real attacks.
Where the engine broke
QuickJS is written in C. If it mishandles memory, a script can escape the sandbox. The analysis describes two such bugs.
The first: during a regular-expression replacement, the engine could recompile the same expression in the middle of the operation. The old bytecode had already been freed, but the engine kept reading it from the same address. This is a use-after-free bug. It could be used to execute code with the privileges of the process running QuickJS. It is unknown whether V12 used this exact bug.
The second involves an await using construct inside a regular function. The engine accepted code it should have rejected. The function returned, but closures inside it kept accessing its former memory region, which could already have been reused for other data.
This is a use-after-return bug. It was found during the audit by Andreas Rösdal, a developer who contributes to QuickJS-ng. He used the Claude Fable 5.
1 neural network to help check the source code. Another memory bug was found on November 11 by Mythos 5.2, and developer Connor Shi confirmed the result.
The author argues that without neural networks, some of these bugs could have sat in the engine for years: few people would manually check what happens when a regex rebuilds itself at runtime.
Patches didn't reach clients right away
Fixing the engine is not enough; the new version has to ship in the apps. Desktop 7.4.2 came out on November 11, after the await using fix had landed upstream, but the patch was not included: the app received five other memory fixes. The needed code appeared only in 7.4.3. Both versions carry the same description: "Bug fixes and other minor improvements." The author had to compare QuickJS versions in the source code to work out what was actually closed.
On Android, version 13.2.2 (build 7303) also fixed await using and moved the widget engine into a separate isolated process with no access to Telegram's files or the network. Now, even if malicious code escapes QuickJS, it does not gain the app's own permissions. Launching new programs from the widget process was blocked, and some other restrictions still run in audit mode: system calls are logged so that unnecessary ones can be blocked later without breaking widgets. In addition, the number of nested graphical effects was limited: in tests, thousands of such effects overflowed the stack or consumed gigabytes of memory. For iPhone and the macOS client, the author did not find build numbers that include the patches.
What to do
- Update: Android 13.2.2 or later, Desktop 7.4.3 or later, and the latest version on other platforms.
- Don't press "Start" on unfamiliar bots.
- You don't need to rewrite your own widgets: the hole was in the client engine, and your HTML stays ordinary. Just don't nest div elements deeper than 1024 levels.
One question remains open. On November 13, the Telegram Info channel reported that widgets in chats had stopped working and suggested they had been disabled because of the vulnerabilities. Durov says the scenario is closed on the server but does not explain how. It is unclear whether widgets were disabled entirely or partially, and when they will return. If your bot built from the tutorial has gone silent, the cause may be on Telegram's side.
- Nov 21, 2026Калифорния судится с OpenAI: её ИИ-агенты как минимум 80 раз вышли из-под контроля
- Nov 21, 2026Dreamteam Raises $53M for a CRM That Fills Itself from Email and Calls
- Nov 21, 2026Нейросеть Claude Opus 5.5 достраивает хоррор Dimension 9 из 15 комнат автора
- Nov 21, 202622 Claude Agents Spent Six Weeks on Black Hole Problems — and Solved Two
Key Questions Answered
What are the key details on Timeline of the week?
On November 5, Telegram Desktop 7.4.0 shipped, with a single line in the release notes: "HTML widgets in bots." On November 6, the widget engine was updated to version 0.6.1: seven fixes, one of which Telegram itself called "the reported RCE." On November 9, widgets opened to all bots via Bot API 10.4, and the same day the QuickJS-ng audit with 27 findings was published. On November 10, engine v0.6.4 closed five more memory bugs and a second code execution bug found on Android 13.2.1.
Where the engine broke?
QuickJS is written in C. If it mishandles memory, a script can escape the sandbox. The analysis describes two such bugs. The first: during a regular-expression replacement, the engine could recompile the same expression in the middle of the operation. The old bytecode had already been freed, but the engine kept reading it from the same address. This is a use-after-free bug. It could be used to execute code with the privileges of the process running QuickJS. It is unknown whether V12 used this exact bug.
What are the key details on Patches didn't reach clients right away?
Fixing the engine is not enough; the new version has to ship in the apps. Desktop 7.4.2 came out on November 11, after the await using fix had landed upstream, but the patch was not included: the app received five other memory fixes. The needed code appeared only in 7.4.3. Both versions carry the same description: "Bug fixes and other minor improvements." The author had to compare QuickJS versions in the source code to work out what was actually closed.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.