Skip to content
XSS Disclosed report Intermediate

Self XSS combine CSRF at https://████████/index.php

The report claims a reflected XSS in the arg2 parameter of index.php, but the payload is only self-XSS because it must be entered manually. The absence of a CSRF token on the POST request allows an attacker to craft a form that submits the payload, turning the self-XSS into a reflected XSS that executes when a victim visits the attacker's page.

manshum12 Follow

Originally disclosed on HackerOne

  • Triaged in 12 hours
  • Fixed in 3 months
  • Disclosed after 16 months

Hi Team,

I found that https://█████████/index.php has vulnerability by XSS in arg2 parameter. Anyway there is no csrf token tied with the post request. As a result this csrf flaw can make the self-xss as a global reflected xss.

CSRF to XSS PoC

<html> <body> <script>history.pushState('', '', '/')</script> <form action="https://██████████/index.php" method="POST"> <input type="hidden" name="█████████" value="1" /> <input type="hidden" name="task" value="azrul&#95;ajax" /> <input type="hidden" name="option" value="community" /> <input type="hidden" name="func" value="register&#44;ajaxCheckEmail" /> <input type="hidden" name="no&#95;html" value="1" /> <input type="hidden" name="arg2" value="&#91;&quot;&#95;d&#95;&quot;&#44;&quot;raygame2222&#37;40af&#46;miljvbi9&lt;img&#32;src&#61;a&#32;onerror&#61;alert&#40;1&#41;&gt;lk2ko&quot;&#93;" /> <input type="submit" value="Submit request" /> </form> </body> </html>

You just need to copy and paste the POC into notepad++ then open it with using firefox or google chrome . After i believe you can see xss window pop up

Impact

i can using this CSRF file send it to people then wide variety of actions, such as performing arbitrary actions on the victim's behalf, and logging their keystrokes.

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

Root cause

Likely the application reflects the arg2 parameter without sanitisation and the POST endpoint lacks a CSRF token, allowing an attacker to submit the payload on the victim's behalf.

Impact

An attacker could send the crafted page to victims and potentially perform actions on their behalf, though only an alert is demonstrated.

What the attacker needed

Victim visits attacker-controlled page

How it was found

  1. Create an HTML file containing a form that posts to the vulnerable index.php with the XSS payload in arg2.
  2. Open the HTML file in a browser.
  3. The user submits the form, sending the payload to the server.
  4. The server reflects the payload and the XSS executes.

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.

Self-XSS is when a script only runs if you type it into the site yourself, so it is not dangerous on its own. CSRF is when another website makes your browser send a request to a site you are logged into without you knowing. Here, because the form has no secret token, an attacker can make your browser send the XSS payload for you, so the script runs without you typing it.

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 manshum12

View all

4 more disclosed reports, best first.

More from U.S. Dept Of Defense

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.