Telegram for Android · Public exploit code

PoC published for sandbox escape in Telegram for Android

· 1 min read

A memory corruption flaw in Telegram for Android's QuickJS-based HTML widget runtime allows arbitrary memory read and write via a stale JSVarRef reference. According to @ptdbugs, a PoC has been published: a malicious widget processed by the client can escape the sandbox and run native ARM64 code via JNI. The source mentions no fix; update the app when a patch lands and avoid widgets from untrusted sources.

Illustration: PoC published for sandbox escape in Telegram for Android
WhatsApp LinkedIn X
HighVulnerabilityPublic exploit codeFix unconfirmed

In 30 seconds

Observed

A proof of concept targeting Telegram for Android is now public. The code sits in a GitHub repository maintained by v12-security, and the security account @ptdbugs announced the release on X.github.comgithub.com · rssOpen original sourceSee in source listptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Alleged

According to @ptdbugs, the flaw corrupts memory inside Telegram's QuickJS-based HTML widget runtime, the engine that runs the mini web apps embedded in chats. The researcher says it hands attackers arbitrary read and write access to memory, breaks out of the app sandbox, and runs native ARM64 code through JNI, the bridge that lets Java apps call lower level system code, all triggered when a malicious widget is processed by an affected client.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

What happened

Observed

The record begins with two artifacts that appeared together. One is a folder named telegram-android-cal inside the public pocs repository of v12-security on GitHub, which hosts proof of concept code. The other is a post from @ptdbugs on X describing the vulnerability and linking to that repository.github.comgithub.com · rssOpen original sourceSee in source listptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Alleged

The announcement lays out the attack chain: a memory corruption bug in the QuickJS-based widget runtime produces a stale JSVarRef, an internal reference to a script variable that outlives the data it points to. That stale reference supposedly yields arbitrary memory read and write, which then enables a sandbox escape and execution of native ARM64 code via JNI when the client processes a malicious widget.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Why it matters

Inferred

If the described chain works as claimed, the stakes are real. Widgets are mini apps delivered through the chat experience, so the delivery vehicle is an app people already trust and keep open all day, and native ARM64 execution would mean the attacker is no longer confined to Telegram's script sandbox but is running directly on the phone's processor.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Inferred

Publishing working exploit code raises the risk profile further. Once a PoC is on a public repository, researchers verifying the bug and attackers looking for a ready made opening can both study it, and nothing in the available material points to a fix.github.comgithub.com · rssOpen original sourceSee in source list

What to do

Observed

Neither the repository entry nor the announcement mentions a patch, a fixed version, or a coordinated disclosure timeline.github.comgithub.com · rssOpen original sourceSee in source listptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Inferred

Until Telegram publishes guidance, cautious users can reduce exposure on their own: avoid opening widgets and mini apps from people or channels they do not trust, keep the official app updated so a fix applies the moment one ships, and watch Telegram's official channels for a security advisory.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Confirmed and still uncertain

Observed

What is established at this point: proof of concept code exists in a public repository, a researcher has publicly described the flaw as a memory corruption issue in the widget runtime with sandbox escape potential, and the target is Telegram for Android.github.comgithub.com · rssOpen original sourceSee in source listptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Inferred

What remains open: whether Telegram was notified before publication, which versions are affected, whether a patch already exists, whether the PoC runs reliably against current builds, and whether anyone has exploited this in the wild. None of the available material addresses these questions.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

What people are saying

Alleged

The public voice here is @ptdbugs, who wrote that a PoC and exploit had been discovered for the vulnerability, then laid out the technical claim in full: memory corruption in the QuickJS-based runtime, arbitrary read and write through a stale JSVarRef, sandbox escape, and native ARM64 execution via JNI.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Observed

The other party in the record is v12-security, whose repository hosts the code itself. The batch includes no statement, blog post, or comment from the firm, and nothing at all from Telegram.github.comgithub.com · rssOpen original sourceSee in source list

Evolution

Observed

The two artifacts carry the same timestamp, so the public record opens with a single simultaneous event: the PoC landing on GitHub and the announcement going out on X at the same moment.github.comgithub.com · rssOpen original sourceSee in source listptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Inferred

Reading the trails, the likely sequence is that the bug was found and weaponized into a working exploit first, then packaged into v12-security's repository, with @ptdbugs handling the disclosure announcement. The material never says who discovered the flaw, so authorship of the research remains an open question.github.comgithub.com · rssOpen original sourceSee in source listptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Reach

Observed

1 independent groups, 1 updates, and 0 engagements.

Technical detail

Alleged

The core claim involves QuickJS, a lightweight JavaScript engine that Telegram reportedly uses to run HTML widgets without a full browser. The bug supposedly creates a stale JSVarRef, which in plain terms is a dangling pointer, an internal handle to a script variable that keeps pointing at memory the engine has already released or reused.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Alleged

From there, the attacker supposedly converts the dangling reference into arbitrary memory read and write, a level of control that generally defeats in-process sandboxing. The claimed final step is jumping out of the sandbox entirely and executing native ARM64 instructions through JNI, the Java Native Interface, the standard bridge between Java code and native code on Android.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Observed

The repository folder is named telegram-android-cal and the exploit targets the Android client specifically. The batch offers no source code walkthrough, no affected version list, and no crash logs, so the technical narrative rests on the announcement's description.github.comgithub.com · rssOpen original sourceSee in source list

Sources and evidence

Observed

This story rests on two items: the public GitHub repository from v12-security containing the proof of concept, and the X post from @ptdbugs describing the vulnerability and linking to the code. One is the artifact itself, the other is the disclosure announcement.github.comgithub.com · rssOpen original sourceSee in source listptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Inferred

The evidence base has clear limits. There is no Telegram statement, no vendor advisory, no independent reproduction of the exploit, and no third-party analysis confirming the claimed memory primitives, so every technical assertion currently traces back to a single researcher's description plus the code itself.github.comgithub.com · rssOpen original sourceSee in source listptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Sources

  1. github.comgithub.com · rss
  2. ptdbugsx.com · ptdbugs · x

Incidents like this, every morning

The ones that need action first, in a 3-minute read.

Free · 1 email a day, in the morning · no spam, unsubscribe in 1 click

Get the next one tomorrow morning

One email a day with what changed, what to fix first and how.

Free · 1 email a day, in the morning · no spam, unsubscribe in 1 click

Share it with your team

Whoever handles security with you should get it too.

LinkedIn X

Your colleague gets a confirmation request. Nothing is sent unless they confirm.

See all news

Read also

Before you go: get this every day

The HIFY Radar daily edition lands every morning with the incidents that need action. Free.

Free · 1 email a day, in the morning · no spam, unsubscribe in 1 click