Exploitable live argument in onClick Function leads to Data Leakage of Inactive/Suspended Products
The product search endpoint in TikTok Shop Seller API trusted a client-supplied 'live' flag, so setting it to false returned data about inactive or suspended products. An attacker could send a crafted request to read listings that should not have been visible.
Originally disclosed on HackerOne
- Triaged in 23 days
- Fixed in 4 months
- Paid in 28 days
- Disclosed after 7 months
Summary by the program
Within the "Search Product" function in TikTok Shop Seller API, the ability to access inactive or suspended products could have been achieved by tampering with the "live" parameter in the API request. We thank @696e746c6f6c for reporting this to our team and confirming its remediation.
Summary by the researcher
TikTok's summary is brief. However, during a source code audit, I discovered the following detailed summary of how I came across this specific code snippet on TikTok
onClick: function () {
Fa('self-promotion', 'live', 'live_dashboard'),
(0, de.xw) (m)
}
where's onClick is a function assigned to an event and then within the onClick function, the Fa() function is called with three arguments: self-promotion, live, and live_dashboard. This function call is used for some live shopping ads. However It seems like that live status is not only for live products but also it was found out that it can be used for data leakage of inactive/suspended products with it's false boolean value but not true value and therefore this creates a security vulnerability.
As such attacker was able to make a POST request to the arbitrary endpoint using fetch API for example:
const fetch = require('node-fetch'); //
const url = 'https://*.tiktok.com/api/v1/xyz';
const postData = {
campaign_id: "0",
product_name: "",
page_index: 1,
page_size: 30,
live: false
};
const headers = {
// headers
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(postData)
})
.then(response => {
if (!response.ok) {
throw new Error('error');
}
return response.json();
})
.then(data => {
console.log(data);
})
.catch(error => {
console.error('fetch error:', error);
});
However if we don't include live JSON property in the request then response would return the following data from the back-end:
"code": 0,
"data": {
"amount": null,
"invited_amount": 0
},
"message": "success"
}
Thanks to the TikTok team for the bounty and the good fix that has been pushed!
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server trusted a client-controlled 'live' parameter to decide which product records to return, rather than enforcing visibility rules server-side.
Impact
An attacker could retrieve information about inactive or suspended products that should not have been exposed through the seller search function.
What the attacker needed
Access to the seller API; ability to send crafted requests
The fix
The issue was fixed by the vendor, which confirmed remediation.
How it was found
- Find the product search request that includes a 'live' parameter.
- Change the 'live' value to false in the request body.
- Send the modified request to the search endpoint.
- Observe that data about inactive or suspended products is returned.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
An API is the behind-the-scenes interface a website uses to fetch data. Here the server let the browser tell it whether to show only live products or also hidden ones, instead of deciding that itself. By flipping that setting, someone could see products that were meant to be hidden.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.