Skip to content
XSS Write-up Beginner

How I Found and Reported a High Severity Stored XSS Vulnerability

A form on a UK Ministry of Defence web application did not properly sanitise user input, allowing stored cross-site scripting. An attacker could execute arbitrary JavaScript in visitors' browsers, potentially stealing session cookies or redirecting them to phishing sites.

IronPurush Follow

Published on medium.com

I’m Sagar Jondhale, also known as IronPurush. I’ve been a bug bounty hunter for the past 4 years and currently work at a cybersecurity company called Anzen Technologies.

IronPurush, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application stored user-supplied form input and rendered it back to other users without proper validation or sanitisation.

Impact

An attacker could execute arbitrary JavaScript in users' browsers, steal session cookies, redirect them to phishing websites, or control their accounts.

What the attacker needed

Access to the public web application; victim visits the affected page

The fix

The report was acknowledged and the MOD security team promptly worked to fix the issue.

How it was found

  1. Use Google dorking to find pages under the .mod.uk scope that contain submit or upload forms.
  2. After several hours of dorking, pick a domain with multiple input fields for further testing.
  3. Test the form fields and observe that input is stored and executed when the page is visited.

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 write-up has not been written yet. The Original tab links to the source.

Stored cross-site scripting (XSS) happens when a website saves what a user types and later shows it to other people without cleaning it first. If the saved text contains code, the browser runs that code as if the website itself had written it. This lets an attacker act inside another user's browser session.

What is XSS?

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

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.