Skip to content
XSS Disclosed report Beginner

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.

apapedulimu Follow

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>

Supporting Material/References:

Screen_Shot_2018-07-02_at_8.38.55_PM.png
Screen_Shot_2018-07-02_at_8.38.55_PM.png From the original on HackerOne

Impact

XSS Will be execute it when user click that button, and attacker can stole user token, IP & etc.

Regards, Apapedulimu

The original report as published on HackerOne, by apapedulimu. 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

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

  1. Create an HTML page with a form that posts to the image upload endpoint, placing a script payload in the CKEditorFuncNum parameter.
  2. Open the HTML page and click the submit button to send the POST request.
  3. 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.

More by apapedulimu

View all

9 more disclosed reports, best first.

More from Semrush

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.