Post Based XSS On Upload Via CK Editor [semrush.com]
The CKEditor image upload endpoint reflected the CKEditorFuncNum parameter without sanitisation, allowing an attacker to inject a script via a POST request. An attacker could trick a user into submitting a form to execute arbitrary JavaScript and steal tokens or other data.
Originally disclosed on HackerOne
- Triaged in 2 days
- Fixed in 29 days
- Paid in 10 days
- Disclosed after 46 days
Summary by the researcher
My Simple Writeup : https://apapedulimu.click/exploiting-xss-in-post-requests-on-semrush-com/
The report
Summary: XSS Via Post Method When Upload via CKEditor
Description: This XSS is execute by error message when upload some image on
https://www.semrush.com/my-posts/api/image/upload/?CKEditor=text&CKEditorFuncNum=0&langCode=en
Browsers Verified In:
- Firefox
Steps To Reproduce:
- This is POST based XSS, need some csrf to trigger the xss
- Create .html code like :
<html>
<body>
<form action="https://www.semrush.com/my-posts/api/image/upload/?CKEditor=text&CKEditorFuncNum=dadasd</script><script>alert(document.domain)</script>&langCode=en" method="POST">
<input type="submit" value="Submit request" />
</form>
</body>
</html>
- and click the submit request
- Or go to http://labs.apapedulimu.click/xss-semrush.html
Supporting Material/References:

Impact
XSS Will be execute it when user click that button, and attacker can stole user token, IP & etc.
Regards, Apapedulimu
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
An attacker could execute JavaScript in the victim's browser and steal user tokens, IP address, and other information.
What the attacker needed
Victim clicks a crafted link or button; attacker hosts a malicious HTML page
How it was found
- Create an HTML page with a form that posts to the image upload endpoint, placing a script payload in the CKEditorFuncNum parameter.
- Open the HTML page and click the submit button to send the POST request.
- The script is intended to run in the semrush.com page context.
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 scripting (XSS) is when a website shows user input without cleaning it, so an attacker can make the site run their own JavaScript. Here, a parameter in the image upload URL was reflected back in an error message, letting an attacker run code in the victim's browser. The attacker needs the victim to submit a form, which is why the report mentions CSRF.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.