Skip to content
CSRF Disclosed report Beginner

CSRF in ticket function

The TikTok Shop ticket creation endpoint did not enforce CSRF protection when the request was sent as form-encoded data instead of JSON, allowing an attacker to forge a request that creates a ticket on behalf of a victim. An attacker could trick a logged-in user into submitting a malicious form, resulting in arbitrary ticket creation.

ibrahim0936356 Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 40 days
  • Paid in 6 days
  • Disclosed after 20 months

Summary by the program

A cross-site request forgery (CSRF) vulnerability was found on a TikTok Shop endpoint, which could have resulted in the arbitrary creation of tickets. We thank @ibrahim0936356 for reporting this to our team

Summary by the researcher

Hi there!

I found this issue by removing the CsrfToken from the header and converting the content type from JSON to x-www-form-urlencoded. After multiple attempts, I was able to create the final payload:

<form method="POST" action="https://vulnerableEndpoint">
    
    <input type="hidden" name="category_id" value="X"/>
    <input type="hidden" name="title" value="Happy"/>
    <input type="hidden" name="componentContents" value='[{"id":"X","raw_value":"very happy"},{"id":"X","raw_value":"[{\"status\":\"done\",\"percent\":XXXX,\"uid\":\"XXXX\",\"originFile\":{},\"name\":\"XXXX\",\"response\":{\"file_id\":\"XXXXXX\",\"file_name\":\"XXXX\",\"file_type\":\"image/png\",\"file_src\":X,\"url\":\"XXXX\"}}]","plain_value":"[\"XXXXXX\"]"}]'/>
</form>
    <script>
        document.forms[0].submit();
    </script>

The original report as published on HackerOne, by ibrahim0936356. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 endpoint relied on JSON content type and a CSRF token header for protection, but failed to enforce CSRF protection when the request was sent as form-encoded data.

Impact

An attacker could create arbitrary tickets on behalf of a victim.

What the attacker needed

Victim is logged in; victim visits a malicious page

How it was found

  1. Remove the CSRF token from the request header.
  2. Change the content type from JSON to x-www-form-urlencoded.
  3. Craft an HTML form with the required fields and auto-submit it.

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.

Cross-site request forgery (CSRF) is when a malicious website makes a logged-in user's browser send a request to another site without the user's knowledge. Here, the ticket creation endpoint accepted form submissions without checking a security token, so an attacker could create a form that automatically submits and creates a ticket for the victim.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by ibrahim0936356

View all

1 more disclosed report, best first.

More from TikTok

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.