POST XSS in https://www.khanacademy.org.tr/ via page_search_query parameter
The search page reflected the POST parameter page_search_query into an input's value attribute without encoding it, so a crafted search term broke out of the attribute and injected an SVG element with an onload handler. An attacker could run script in a victim's browser, for example by getting them to submit a crafted search form.
Originally disclosed on HackerOne
- Fixed in 16 hours
- Disclosed after 2 months
Hey there, while testing your program I came across a XSS vulnerability in the search area of your website. The vector uses HTTP POST request and the parameter is "page_search_query"" on www.khanacademy.org.tr/arama.asp
In the next topics I will demonstrate how you can reproduce the vulnerability found on your website:
1º Go to your website and in the search box insert the following payload: ""--!><Svg/OnLoad=(confirm)(/xss/)> xss.jpg
2º Output of the payload: xss2.jpg
3º Vulnerable code with the payload:
<form class="large-search-form" action="arama.asp" method="post"> <input id="large-search-input" name="page_search_query" class="placeholder simple-input search-input blur-on-esc large-search-bar ui-corner-all" autocomplete="off" value="""--!><Svg/OnLoad=(confirm)(/xss/)>" style="margin-top:0px !important"> <i class="icon-search"></i>
xss3.jpg
Exploitability: Attacker sends text-based attack scripts that exploit the interpreter in the browser. Almost any source of data can be an attack vector, including internal sources such as data from the database.
Please let me know if you need further explanation or details. Best Regards, Miguel Santareno
Impact
Attackers can execute scripts in a victim’s browser to hijack user sessions, deface web sites, insert hostile content, redirect users, hijack the user’s browser using malware, etc.
Attachments



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
Impact
Attackers could execute scripts in a victim's browser to hijack sessions, deface the site, insert hostile content or redirect users.
What the attacker needed
Victim submits a crafted search
How it was found
- Open the site's search page.
- Enter a crafted search term containing quote and angle-bracket characters plus an SVG element with an onload handler.
- Submit the search form.
- The page reflects the term into the input's value attribute and the injected SVG runs its handler.
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.
A search box on the site took whatever was typed and pasted it straight into the page's HTML without cleaning it. By typing special characters, an attacker can close the existing HTML tag and add their own, such as an image or SVG that runs JavaScript when it loads. That script then runs in the browser of anyone who submits the same search, letting the attacker act as that user.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.