Skip to content

Independent cybersecurity briefing

Latest

RSS
Breaches, bounties, zero-days, and AI.

Bug Bounty Write Ups

TikTok Account Takeover: The One-Click Deeplink Bug

One tapped link could load an attacker’s page inside TikTok’s Android app and hand it 70+ bridge methods. CVE-2022–28799, CVSS 8.3

Adam Hale, ZeroDay Times editorBy Adam Hale3 min read

Still life for “TikTok Account Takeover: The One-Click Deeplink Bug”: a phone on the desk, dark grove, Android mark, signal 8.3. [ BUG BOUNTY ] badge.

AI-generated illustration

One tapped link could load an attacker’s page inside TikTok’s Android app and hand it 70+ bridge methods. CVE-2022–28799, CVSS 8.3

AI-assisted: drafted with AI help from public sources, then reviewed and edited. This is an analytical case study of a public disclosure, not my own discovery.

Tap one link on Android and your TikTok account belongs to someone else: private videos made public, messages sent, uploads posted in your name. That was the TikTok account takeover Microsoft researcher Dimitrios Valsamaras reported in early 2022. It affected both Android versions of the app, with over 1.5 billion combined installs.

Disclaimer: * Educational and defensive use only. TikTok fixed this in app version 23.7.3, less than a month after the report. Deeplink names, parameters and payloads are intentionally omitted.*

Vulnerability Overview

  • Type: Unvalidated deeplink forcing an app WebView to load an arbitrary URL, which then reached a privileged JavaScript bridge
  • CWE: CWE-425 (Direct Request / Forced Browsing), as classified on the HackerOne report. Analytical mapping: CWE-749 (Exposed Dangerous Method or Function)
  • CVE / CVSS: CVE-2022–28799, rated high severity, CVSS 8.3
  • Bounty: Not publicly disclosed. Reported through TikTok’s HackerOne program and Microsoft’s coordinated disclosure process

How the TikTok Account Takeover Worked (high level)

Many apps show web content inside a WebView, an embedded browser. To let those pages do app things, developers attach a JavaScript bridge: Java methods that page scripts can call. TikTok’s bridge exposed more than 70 methods. Some could read or change account data. Others could make authenticated requests to any URL.

That is safe only if the WebView loads TikTok’s own pages. TikTok tried to enforce that: one internal deeplink could open a URL in the WebView, and a server-side check rejected untrusted hosts.

Microsoft found the gaps. A public, verified TikTok link could forward into internal deeplinks that were never meant to be reachable from outside. And extra query parameters could make the host check pass for a URL it should have rejected.

Chained, one crafted link loaded an attacker’s page into the trusted WebView with the bridge attached. The page could then call bridge methods, steal authentication tokens and edit the profile. Microsoft’s proof of concept rewrote the victim’s bio to prove control.

Business Impact

One click, no password, no warning. For creators, that means hijacked audiences and leaked private drafts. For TikTok, it meant a takeover bug spanning its global user base.

Microsoft found no evidence of in-the-wild exploitation, and TikTok shipped the fix quickly.

Fixing TikTok Account Takeover-Style WebView Bugs (my own analysis)

1. Decide trust on the device, with exact host matching. No substring checks, no server verdicts that request parameters can steer.

2. Untrusted URLs go to the system browser. They never load where a bridge is attached.

3. Re-check origin on every bridge call. Pages navigate. Expose the smallest method set each origin needs.

# Pseudocode: only exact trusted hosts ever share a WebView with the bridge
TRUSTED = {"www.app.example", "m.app.example"}
ALLOWED = {"www.app.example": {"share", "close"}, "m.app.example": {"close"}}
def open_link(url):
    u = parse_url(url)
    if u.scheme != "https" or u.hostname not in TRUSTED or u.username or u.port not in (None, 443):
        return open_in_system_browser(url)        # no bridge for anything else
    return load_in_bridged_webview(url)
def on_bridge_call(view, method):
    host = parse_url(view.current_url()).hostname
    if host not in TRUSTED or method not in ALLOWED[host]:
        return "rejected"                         # checked on every call, after redirects
    return dispatch(method)
# Test: m.app.example.evil.io, evil.io/?m.app.example, user@ host -> system browser

Key Takeaways

  • A JavaScript bridge turns any page in that WebView into app code. Guard what loads there.
  • Internal deeplinks become public attack surface the moment a public link can forward to them.
  • Host checks that inputs can influence are not host checks.

Credit & Sources

Discovered and reported by Dimitrios Valsamaras (Microsoft 365 Defender Research Team). Primary source: Microsoft Security Blog, Vulnerability in TikTok Android app could lead to one-click account hijacking, 31 August 2022. Corroboration: HackerOne report #1500614 and the CVE-2022–28799 record. Facts come from those sources; analysis and code are original.

Next breakdown: another real bug bounty case. Follow @masimshahzad for daily bug bounty breakdowns.

First published by Adam Hale on Medium.

Sources

Share

Corrections and tips:[email protected]