Tag Myself in Your Favorite TikTok Artist Video [IDOR]
The tag update endpoint for TikTok videos did not properly verify that the requesting user owned the video being modified. An attacker could tag arbitrary users on any other user's video by manipulating the video ID parameter.
Published on apapedulimu.click
On H-1 Eidul Fitri I spent my time on in front of my laptop while listening to Takbir from the nearest mosque. Doing bug bounty and targeting TikTok mobile apps.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
TikTok's mobile apps expose a tagging (mention) feature: a user can tag other accounts in a video, and can later remove those tags. The tagging is performed by the app through an API endpoint on api22-normal-c-useast2a.tiktokv.com, under the path /tiktok/interaction/mention/tag/update/v1. The request carries the video identifier (aweme_id) and lists of user IDs to add (add_uids) and to remove (remove_uids).
The researcher was hunting on the TikTok mobile apps with a focus on access-control issues, that is, on what a user can and cannot reach or modify.
Setup
The work was done on an iPhone 6s+ running iOS 14.4.2, with the TikTok app version 22.8.2 (build 228201), using Burp Suite to intercept and modify the app's traffic. The request shown below carries the user's own cookies and signing headers, which are redacted here.
The hunt took place on the day before Eidul Fitri, with the researcher targeting the mobile apps and specifically the access-control theme.
Finding it
After getting stuck poking at various features, the researcher focused on the video-related features and noticed that the tag endpoint looked vulnerable to an IDOR. The first attempt, changing the aweme_id to another video's ID while only adding a tag, did not work: the request was not rejected outright, but the tag was not applied. At that point the POST body contained only the video ID and the add_uids parameter.
The second attempt changed the approach: the researcher removed a tag and tagged another person in the same request, which caused the app to include a remove_uids parameter in the POST body. With that parameter present, the response said success, and the other user's video now showed the tag. Removing remove_uids again made the IDOR stop working as expected.
This is the odd condition of the bug: the presence of remove_uids alongside add_uids is what makes the cross-video tag update succeed.
Exploitation
Step 1: capture the tag update request
The researcher tagged people on a video, then untagged them and tagged another person, capturing the resulting request. The full request looks like this (cookies, tokens and signing values redacted):
POST /tiktok/interaction/mention/tag/update/v1?residence=ID&device_id=7049655035710670337&os_version=14.4.2&iid=7088340292101621530&app_name=trill&locale=en&ac=WIFI&sys_region=ID&js_sdk_version=&version_code=22.8.2&channel=App%20Store&op_region=ID&tma_jssdk_version=&os_api=18&idfa=[redacted]&idfv=[redacted]&device_platform=iphone&device_type=iPhone8,2&openudid=[redacted]&account_region=id&tz_name=Asia/Jakarta&tz_offset=25200&app_language=en¤t_region=ID&build_number=228201&aid=1180&mcc_mnc=&screen_width=1242&uoo=1&content_language=&language=en&cdid=[redacted]&app_version=22.8.2 HTTP/2
Host: api22-normal-c-useast2a.tiktokv.com
Cookie: [redacted]
Content-Length: 101
Passport-Sdk-Version: 5.12.1
X-Tt-Token: [redacted]
X-Vc-Bdturing-Sdk-Version: 2.2.0
Content-Type: application/x-www-form-urlencoded
User-Agent: TikTok 22.8.2 rv:228201 (iPhone; iOS 14.4.2; en_ID) Cronet
X-Tt-Cmpl-Token: [redacted]
Sdk-Version: 2
X-Tt-Dm-Status: login=1;ct=1;rt=1
X-Ss-Stub: [redacted]
X-Tt-Store-Idc: useast2a
X-Tt-Store-Region: id
X-Tt-Store-Region-Src: uid
X-Bd-Kmsv: 0
X-Ss-Dp: 1180
X-Tt-Trace-Id: [redacted]
Accept-Encoding: gzip, deflate
X-Ladon: [redacted]
X-Khronos: 1651336527
X-Argus: [redacted]
X-Gorgon: [redacted]
add_uids=%5B6868261750475621377%5D&aweme_id=7031653349946707201&remove_uids=%5B6948164304332555266%5D
The body is form-encoded. add_uids is a JSON-style array containing the user ID to tag (6868261750475621377), remove_uids is an array containing the user ID to untag (6948164304332555266), and aweme_id is the video being modified (7031653349946707201). The query string carries the usual app metadata: device identifiers, app version 22.8.2, region and locale values, and the platform details. The headers include the app's signing and anti-bot values (X-Ladon, X-Khronos, X-Argus, X-Gorgon, X-Ss-Stub, X-Tt-Token), which the app generates for each request.
Step 2: change the video ID
With the request captured, the researcher edited the aweme_id parameter to the ID of another user's video, keeping both add_uids and remove_uids in the body. The server responded with success, and the target video then displayed the tag that had been added from the attacker's session.
Step 3: confirm the result
Opening the video whose aweme_id had been substituted showed the tagged user that the attacker had added. The tag had been written to a video the attacker did not own.
The reproduction steps as recorded are:
- Tag people on some video, then untag them and change to another person.
- See the response. Edit the
aweme_idparameter to anyaweme_id(video ID). - Look at the video with the changed
aweme_id: it will be tagged with the people you tagged on your own video.
The researcher recorded the reproduction and reported it to TikTok on HackerOne.
Root cause
The endpoint accepted a video identifier for a video the user did not own and applied the tag update. The authorisation check that should tie aweme_id to the caller's account is missing or ineffective, which is the IDOR.
The curious part is the dependency on remove_uids: with only add_uids and a foreign aweme_id, the request did not produce the tag, but adding remove_uids made the same cross-video write succeed. The report does not explain why; . The app's request signing headers were present in the captured request, and the modified request still succeeded.
Impact
An authenticated user could tag arbitrary accounts on other users' videos by substituting the aweme_id, as long as the request also carried a remove_uids value. This lets an attacker attach mentions to videos they do not own. The report does not describe any further consequence beyond the tag being added.
Fix
TikTok fixed the issue quickly after the report.
Variants to test
- Other mention or interaction endpoints. Look for endpoints that take an object ID (video, comment, live room) plus a list of user IDs, and try substituting the object ID while keeping the request otherwise valid. A positive result is a success response and the change appearing on the other object.
- Combined add and remove parameters. On any endpoint with paired list parameters, try sending both together and compare with sending only one. A positive result is that the combined form bypasses an ownership check that the single form enforces.
- Signed mobile requests. When testing apps with request signing, replay a captured signed request with only the object ID changed. A positive result is that the signature still validates and the server acts on the modified object.
Timeline
- Apr 30th 2022: report submitted via HackerOne.
- May 5th 2022: HackerOne staff triaged.
- May 6th 2022: CVSS updated.
- May 13th 2022: resolved.
- Jun 7th 2022: bounty of $2,500 plus a $500 bonus.
Conclusion
The lesson the researcher drew is to explore every feature and not to assume that an endpoint is not vulnerable because a similar one, or the same one tested differently, was not.


What happened, in plain words
TikTok is a mobile app where people post short videos. One of its features lets you tag (mention) other accounts in a video, and later remove those tags. The app does this by sending a message to TikTok's servers over the internet, asking them to add or remove a name on a particular video.
A security researcher spent a day hunting for bugs in the TikTok mobile apps, looking specifically at access control: the rules that decide what one user is and is not allowed to see or change. He found that the request the app sends when you update tags could be made to change the tags on somebody else's video. By changing one number in that request, the video's ID, he could add a tag to somebody else's video. This kind of bug is called an IDOR (Insecure Direct Object Reference): the server takes an identifier straight from the user and acts on it without checking that the user is allowed to touch the thing it points to.
TikTok fixed it quickly, and paid a bounty of $2,500 plus a $500 bonus.
Background: the pieces you need to know
Before the details, a few everyday ideas.
- An app talking to a server. Your phone does not hold all the videos; it asks TikTok's computers for them. Each such conversation is a request (what your phone sends) and a response (what the server sends back).
- An API. Think of a restaurant. You do not walk into the kitchen; you tell the waiter what you want, and the waiter brings it. An API (Application Programming Interface) is that waiter: a fixed set of addresses and instructions the app uses to ask the server to do things, like "add this tag to this video".
- An endpoint. Each specific address in that API is an endpoint. Here the endpoint is a path on a server called
api22-normal-c-useast2a.tiktokv.com, namely/tiktok/interaction/mention/tag/update/v1. That is the "counter" you go to when you want to change tags. - A cookie and a token. When you log in, the server gives your phone a small piece of proof that you are you, rather like a wristband at an event. A cookie is one way this proof is carried; a token is another. Every request includes it so the server knows which account is asking. If someone steals it, they can pretend to be you, which is why such values are kept secret.
- Headers and body. A request has two parts. The headers are like the label on an envelope: who it is from, what format the contents are in, and so on. The body is the letter inside: the actual data, here the list of users to tag and the video to change.
- A parameter. A parameter is one named value in a request, for example
aweme_id(TikTok's internal name for a video ID) oradd_uids(the list of user IDs to add). - IDOR. Imagine a hotel where your room key is just the room number written on a card, and the door only checks that the number is valid, not that the room is yours. Change the number and you can open any door. That is an IDOR: the server trusts an identifier supplied by the user without checking ownership.
- Burp Suite. A tool that sits between your phone and the internet, letting you pause a request, read it, change it, and send it on. It is how the researcher inspected and edited the app's traffic.
Setting up
The work was done on an iPhone 6s+ running iOS 14.4.2, with TikTok app version 22.8.2 (build 228201), using Burp Suite to intercept and modify the app's traffic. The captured request carries that user's own cookies and signing headers. The hunt happened on the day before Eidul Fitri, with the researcher targeting the mobile apps and the access-control theme in particular.
Finding it
At first the researcher got stuck. He poked at various features, navigating around the app with Burp Suite watching, and found no clear lead. Then he focused on the video-related features and noticed that the tag endpoint looked vulnerable to an IDOR.
The first attempt was to change aweme_id to another video's ID while only adding a tag. That did not work: the request was not rejected outright, but the tag was not applied. At that point the POST body contained only the video ID and the add_uids parameter.
The second attempt changed the approach: the researcher removed a tag and tagged another person in the same request. That made the app include a remove_uids parameter in the POST body. With that parameter present, the response said success, and the other user's video now showed the tag. Removing remove_uids again made the IDOR stop working as expected.
This is the odd condition of the bug: the presence of remove_uids alongside add_uids is what makes the cross-video tag update succeed.
Exploitation
Step 1: capture the tag update request
The researcher tagged people on a video, then untagged them and tagged another person, capturing the resulting request. The full request looks like this (cookies, tokens and signing values redacted):
POST /tiktok/interaction/mention/tag/update/v1?residence=ID&device_id=7049655035710670337&os_version=14.4.2&iid=7088340292101621530&app_name=trill&locale=en&ac=WIFI&sys_region=ID&js_sdk_version=&version_code=22.8.2&channel=App%20Store&op_region=ID&tma_jssdk_version=&os_api=18&idfa=[redacted]&idfv=[redacted]&device_platform=iphone&device_type=iPhone8,2&openudid=[redacted]&account_region=id&tz_name=Asia/Jakarta&tz_offset=25200&app_language=en¤t_region=ID&build_number=228201&aid=1180&mcc_mnc=&screen_width=1242&uoo=1&content_language=&language=en&cdid=[redacted]&app_version=22.8.2 HTTP/2
Host: api22-normal-c-useast2a.tiktokv.com
Cookie: [redacted]
Content-Length: 101
Passport-Sdk-Version: 5.12.1
X-Tt-Token: [redacted]
X-Vc-Bdturing-Sdk-Version: 2.2.0
Content-Type: application/x-www-form-urlencoded
User-Agent: TikTok 22.8.2 rv:228201 (iPhone; iOS 14.4.2; en_ID) Cronet
X-Tt-Cmpl-Token: [redacted]
Sdk-Version: 2
X-Tt-Dm-Status: login=1;ct=1;rt=1
X-Ss-Stub: [redacted]
X-Tt-Store-Idc: useast2a
X-Tt-Store-Region: id
X-Tt-Store-Region-Src: uid
X-Bd-Kmsv: 0
X-Ss-Dp: 1180
X-Tt-Trace-Id: [redacted]
Accept-Encoding: gzip, deflate
X-Ladon: [redacted]
X-Khronos: 1651336527
X-Argus: [redacted]
X-Gorgon: [redacted]
add_uids=%5B6868261750475621377%5D&aweme_id=7031653349946707201&remove_uids=%5B6948164304332555266%5D
Line by line, in plain words:
- The first line is the request itself.
POSTmeans "I am sending data to the server to change something". The long path after it is the endpoint, followed by a?and a list of small settings separated by&. These settings are app metadata: device identifiers, app version 22.8.2, region and locale values, and platform details.HTTP/2is the version of the language the phone and server speak. Host:names the server being contacted.Cookie:is the login proof mentioned earlier, redacted here because it would let anyone act as the user.Content-Length: 101says how long the body is, in bytes.Content-Type: application/x-www-form-urlencodedsays the body is formatted asname=valuepairs joined by&, the same style as the query string.User-Agent:tells the server which app and phone version is calling.- The
X-...headers (X-Tt-Token,X-Ss-Stub,X-Ladon,X-Khronos,X-Argus,X-Gorgon, and others) are the app's signing and anti-bot values. The app generates them for each request. They are redacted here. - The blank line separates headers from body.
- The body has three parameters.
add_uids=%5B6868261750475621377%5Dis the list of user IDs to tag;%5Band%5Dare the encoded forms of[and], so the value is the array[6868261750475621377].aweme_id=7031653349946707201is the video being modified.remove_uids=%5B6948164304332555266%5Dis the list of user IDs to untag, here[6948164304332555266].
Step 2: change the video ID
With the request captured, the researcher edited the aweme_id parameter to the ID of another user's video, keeping both add_uids and remove_uids in the body. The server responded with success, and the target video then displayed the tag that had been added from the attacker's session.
Why this step matters: the only thing that changed was the number identifying the video. Everything else, including the login proof and the app's signatures, stayed the same. The request succeeded even though the video belonged to another user, which is the IDOR.
Step 3: confirm the result
Opening the video whose aweme_id had been substituted showed the tagged user that the attacker had added. The tag had been written to a video the attacker did not own.
The reproduction steps as recorded are:
- Tag people on some video, then untag them and change to another person.
- See the response. Edit the
aweme_idparameter to anyaweme_id(video ID). - Look at the video with the changed
aweme_id: it will be tagged with the people you tagged on your own video.
The researcher recorded the reproduction and reported it to TikTok on HackerOne, a platform where security researchers report bugs to companies.
Root cause
The endpoint accepted a video identifier for a video the user did not own and applied the tag update. The authorisation check that should tie aweme_id to the caller's account is missing or ineffective, which is the IDOR.
The curious part is the dependency on remove_uids: with only add_uids and a foreign aweme_id, the request did not produce the tag, but adding remove_uids made the same cross-video write succeed. The report does not explain why; . The app's request signing headers were present and valid, so they did not prevent the modified request: they authenticate the client, not the ownership of the object being changed.
Impact
A logged-in user could tag arbitrary accounts on other users' videos by substituting the aweme_id, as long as the request also carried a remove_uids value. This lets an attacker attach mentions to videos they do not own. The report does not describe any further consequence beyond the tag being added.
Fix
TikTok fixed the issue quickly after the report.
Variants to test
- Other mention or interaction endpoints. Look for endpoints that take an object ID (video, comment, live room) plus a list of user IDs, and try substituting the object ID while keeping the request otherwise valid. A positive result is a success response and the change appearing on the other object.
- Combined add and remove parameters. On any endpoint with paired list parameters, try sending both together and compare with sending only one. A positive result is that the combined form bypasses an ownership check that the single form enforces.
- Signed mobile requests. When testing apps with request signing, replay a captured signed request with only the object ID changed. A positive result is that the signature still validates and the server acts on the modified object.
Timeline
- Apr 30th 2022: report submitted via HackerOne.
- May 5th 2022: HackerOne staff triaged.
- May 6th 2022: CVSS updated.
- May 13th 2022: resolved.
- Jun 7th 2022: bounty of $2,500 plus a $500 bonus.
Conclusion
The lesson the researcher drew is to explore every feature and not to assume that an endpoint is not vulnerable because a similar one, or the same one tested differently, was not.


Glossary
- API: the fixed set of addresses and instructions an app uses to ask a server to do things, like a waiter taking your order to the kitchen.
- Endpoint: one specific address in an API, such as the tag update path on
api22-normal-c-useast2a.tiktokv.com. - Request: the message your phone sends to a server.
- Response: the message the server sends back.
- Header: a labelled piece of information attached to a request or response, like the writing on an envelope.
- Body: the actual data carried inside a request, here the list of users to tag and the video ID.
- Parameter: one named value in a request, for example
aweme_idoradd_uids. - Cookie: a small piece of data your browser or app stores and sends back so the server can recognise your session.
- Token: a value that proves who you are or that a request is genuine, sent with requests.
- Session: the period during which the server treats your requests as coming from one logged-in user.
- Access control: the rules that decide what a given user is allowed to see or change.
- Authorisation check: the server-side test that confirms a user is allowed to perform an action on a particular object.
- IDOR (Insecure Direct Object Reference): a bug where the server takes an identifier supplied by the user and acts on it without checking ownership, like a hotel key that only checks the room number is valid.
aweme_id: TikTok's internal name for a video identifier.add_uids: the parameter listing user IDs to tag on a video.remove_uids: the parameter listing user IDs to untag from a video.- POST: an HTTP method meaning "send data to the server to change something".
- Form-encoded: a body format of
name=valuepairs joined by&, with special characters percent-encoded (for example%5Bfor[). - Percent-encoding: writing special characters in a safe form, such as
%5Bfor[and%5Dfor]. - Query string: the part of a URL after
?, holding small settings asname=valuepairs. - HTTP/2: the version of the language the phone and server use to exchange requests and responses.
- User-Agent: a header telling the server which app and device version is calling.
- Request signing: headers the app generates to prove a request came from the official app, like a wax seal.
- Anti-bot: measures meant to stop automated abuse of a service.
- Burp Suite: a tool that sits between your phone and the internet so you can pause, read and edit requests.
- HackerOne: a platform where security researchers report bugs to companies.
- Triaged: reviewed and accepted as a real issue by the receiving team.
- CVSS: a standard scoring system for how severe a security issue is.
- Bounty: a reward a company pays a researcher for reporting a valid bug.