Bug HTML Injection On Tokopedia !
A chat voucher feature on Tokopedia accepted unsanitised HTML in a JSON request, allowing an attacker to inject markup into the page shown to a victim. The report claims this could modify the web page presented to users, but does not demonstrate script execution or data theft.
jowi
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the voucher request body was not sanitised or encoded before being rendered in the chat page.
Impact
An attacker could inject HTML into the chat page shown to a victim, potentially modifying the page content, though the report does not show script execution or account compromise.
What the attacker needed
A Tokopedia account; victim in chat; Burp Suite to modify request
The fix
The application should filter metacharacters from user input, and the report states the bug was fixed.
How it was found
- Log in to the Tokopedia application.
- Open chat and select a victim.
- Click the plus button and select voucher.
- Choose a random voucher and open Burp Suite.
- Send the voucher and change the request with an HTML injection payload.
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 write-up has not been written yet. The Original tab links to the source.
HTML injection means a website takes text you type and puts it into the page without cleaning it first. If that text contains HTML tags, the browser treats them as part of the page, so an attacker can add fake content or links. Here the voucher message in a chat was not cleaned, so injected HTML appeared in the chat.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.