Skip to content
XSS Disclosed report Beginner

CSRF to Reflected XSS at echo.urbandictionary.biz via spoofing content type

The echo service reflects the body of a POST request back in the response, and requesting a path ending in .html makes the response be served as HTML. An attacker could craft a form that submits a script payload, causing reflected cross-site scripting in a victim's browser.

osama-hamad Follow

Originally disclosed on HackerOne

  • Fixed in 29 days
  • Disclosed after 3.7 years

Details

The host is vulnerable to XSS due to the fact that it does reflect any sent POST request body when the request sent to any existed/non-existed filename with .html extension which spoof the response content type to HTML.

Proof of Concept

<html>
  <!-- CSRF PoC - generated by Burp Suite Professional -->
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="https://echo.urbandictionary.biz/xsxsxs.html" method="POST" enctype="text/plain">
      <input type="hidden" name="&#13;&#10;&lt;script&gt;alert&#40;document&#46;domain&#41;&lt;&#47;script&gt;" value="" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

1.png
1.png From the original on HackerOne

Impact

Typical cross site scripting impact, Injecting malicious javascript code into victim browser.

The original report as published on HackerOne, by osama-hamad. 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 inject malicious JavaScript into a victim's browser, with typical cross-site scripting consequences.

What the attacker needed

Victim submits a crafted form

How it was found

  1. Create an HTML page containing a form that posts to a path ending in .html on the echo host.
  2. Set the form encoding to text/plain and include a hidden field whose name contains a script payload.
  3. Submit the form so the POST body is reflected in an HTML response.

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 website that echoes back whatever you send it can be dangerous if it also treats that content as a web page. Here, sending a form with a script inside to a path ending in .html made the browser run the script. This lets an attacker run code in a victim's browser if the victim submits the form.

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 osama-hamad

View all

6 more disclosed reports, best first.

More from Urban Dictionary

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.