In-depth lesson · technique
Stored XSS
What every disclosed Stored XSS report in the index teaches, put together: how it works, how it changed year by year, where it turns up, and things to try. Every point shows the reports it is seen in.
- disclosed reports read
- 1,991
- reports cited in this lesson
- 609
- median public bounty
- $1,000
Learning Beginner web, step 5
Overview
What it is and why programs pay for it.
Stored cross-site scripting (XSS) is a vulnerability where an application saves user-supplied input and later displays it to other users without proper encoding or sanitisation. This allows an attacker to inject script that executes in the browsers of anyone who views the affected page. Bug bounty programs care about stored XSS because it can persist and affect many users, including administrators, and often leads to account takeover, data theft, or full compromise of the application.
Stored XSS typically arises when developers insert stored input into HTML without output encoding or sanitisation. Common root causes include rendering user-controlled values directly into HTML attributes, JavaScript strings, or markup without escaping, and accepting file uploads such as SVG that contain active content. It is most often found in features that display user-generated content to others: profile fields, comments, file names in directory listings, markdown rendering, admin panels reviewing public submissions, and rich-text editors.
The impact of stored XSS ranges from session theft and account takeover to performing actions on behalf of the victim, reading private information, and chaining with other vulnerabilities such as CSRF or SSRF. Because the payload is stored, it can affect multiple users over time, making it a high-severity finding for most programs.
Seen in these reports10
-
$50 -
$750 -
$150 Medium
Show 5 moreShow fewer
-
$100 Low -
High -
Medium -
Medium -
Medium
How it works
The mechanics, as the reports show them.
The attack works in three stages: injection, storage, and execution. First, the attacker submits input containing script or markup through a feature that accepts user data, such as a profile field, comment, file upload, or form. The application stores this input, often in a database or file system, without sanitising it.
Second, when another user (or the attacker) views a page that displays the stored input, the application inserts the input into the HTML without encoding it. This can happen in various contexts: inside HTML tags, attributes, JavaScript strings, or even CSS. If the input contains characters that break out of the intended context, the browser interprets it as executable code.
Third, the browser executes the injected script as if it were part of the legitimate page. This script can then perform actions such as stealing cookies, making requests on behalf of the user, or modifying the page content. The execution context depends on where the input is reflected: for example, script inside an HTML attribute may require user interaction, while script in a script block executes immediately.
What makes this possible is the lack of proper output encoding or sanitisation. Developers often trust that input is safe because it is stored, or they use incomplete filters that can be bypassed. Common mistakes include using blacklists that block only literal angle brackets, failing to normalise whitespace or control characters before scheme checks, and allowing dangerous file types like SVG that can contain script.
Stored XSS can also arise from second-order injection, where the payload is stored in one place and rendered in another, such as a public form that is reviewed in an internal admin panel. This makes it particularly dangerous because the attacker may not need to access the victim's context directly; the payload executes when an administrator views the stored data.
Seen in these reports14
-
$1,250 High -
$1,000 High -
$750 Medium
Show 5 moreShow fewer
-
$650 Medium -
$500 -
$500 High -
$350 Medium -
$300
Year by year
13 yearsWhat each year's disclosed reports show, newest first. A year with few reports says less.
| 2001 | 1 |
|---|---|
| 2008 | 1 |
| 2009 | 1 |
| 2010 | 3 |
| 2011 | 4 |
| 2012 | 3 |
| 2013 | 11 |
| 2014 | 28 |
| 2015 | 51 |
| 2016 | 96 |
| 2017 | 115 |
| 2018 | 79 |
| 2019 | 72 |
| 2020 | 118 |
| 2021 | 104 |
| 2022 | 110 |
| 2023 | 128 |
| 2024 | 120 |
| 2025 | 284 |
| 2026 | 251 |
-
2026
New this year3
- Bypassing an SVG content blocklist and a short scan limit to get script through first appears in the disclosed reports.
- Bypassing reCAPTCHA and the absence of rate limiting on a public contact API first appears in the disclosed reports.
- Bypassing username validation in the XML-RPC addUser call to store markup in a username first appears in the disclosed reports.
Kept working5
- Revive Adserver administrative pages such as statistics, audit logs and maintenance tools were used as storage points in the disclosed reports.
- SVG files containing script were uploaded and opened in the management interface as another user in the disclosed reports.
-
2025
New this year3
- Bypassing the content security policy through markdown placeholder replacement inside a span tag first appears in the disclosed reports.
- Using a browser link type hint on a response with no Content-Type header to get it interpreted as HTML first appears in the disclosed reports.
- Registering a service worker with a manipulated resourceBaseAuthority parameter to traverse paths first appears in the disclosed reports.
Kept working4
- GitLab was hit through Markdown, labels, merge requests, profiles and editors, often paired with a content security policy bypass, in the disclosed reports.
- Revive Adserver administrative pages such as statistics, audit logs and maintenance tools were used as storage points in the disclosed reports.
-
2024
New this year3
- Copying crafted content with a data attribute containing embedded markup and pasting it into a rich text editor first appears in the disclosed reports.
- Spoofing analytics events so a page path is a javascript-scheme URL and having a victim click it in a top pages visualisation first appears in the disclosed reports.
- Looking for places where sanitised content is later decoded or re-parsed, turning stored markup back into active script, first appears in the disclosed reports.
Kept working5
- GitLab was hit through Markdown, labels, merge requests, profiles and editors, often paired with a content security policy bypass, in the disclosed reports.
- A forum's URL tag with a crafted scheme was used to bypass the filter and execute script in the disclosed reports.
Earlier years10
Where it is found
33The features and places the reports found it in, most-reported first.
-
Static file servers that render directory indexes in HTML.
Seen in 5 reports
-
Ad server inventory, conversion statistics and tracker names.
Seen in 4 reports
-
SVG file uploads rendered in management interfaces.
Seen in 3 reports
-
Kubernetes proxy endpoints in self-hosted GitLab.
Seen in 2 reports
-
Markdown rendering with placeholder replacement.
Technologies in these reports16
Root causes
88The mistakes in the code or configuration behind the reports.
-
Stored input was inserted into the page without output encoding or sanitisation.
Seen in 3 reports
-
A currency formatting value was stored and rendered into admin pages without output encoding.
Seen in 2 reports
-
The question edit view rendered the stored product name as raw HTML without sanitising or escaping it.
Seen in 2 reports
-
The label colour value from imported data was inserted into the page without sanitisation.
Seen in 2 reports
-
SVG uploads were accepted and rendered without sanitising or blocking embedded script.
Seen in 2 reports
-
$100 Low -
$150 Medium
-
Things to try
The most-reported tests in the largest contexts. Tick what you have tried; ticks stay in this browser and carry over to the full checklist. Test only what a program's scope allows.
ticked in this lesson
Profile fields and display names
of 3 ticked-
Seen in 11 reports
-
Seen in 3 reports
-
Seen in 2 reports
CI and developer tooling
of 3 ticked-
Seen in 2 reports
-
Seen in 2 reports
Admin panels and staff views
of 3 ticked-
Seen in 3 reports
-
Seen in 2 reports
-
Seen in 2 reports
Bypasses and variations
18How reports got past filters, encoders and other defences.
-
Bypass the content security policy through markdown placeholder replacement inside a span tag.
-
A link filter was bypassed by doubling characters.
Seen in 1 report
-
A web application firewall that filtered HTML tags was bypassed using an HTML comment.
Seen in 1 report
-
$1,000 High
-
-
An input filter only blocked literal angle brackets and did not decode HTML entities before checking, allowing a bypass.
Seen in 1 report
-
Medium
-
-
An injected approval rule name executed despite the site's content security policy.
Seen in 1 report
Payouts
262 paidPublic bounties in US dollars, from the data. 262 of 1,991 reports show an amount.
- a quarter paid up to
- $500
- median
- $1,000
- three quarters paid up to
- $2,895
- highest
- $40k
One in ten paid reports was paid $5,000 or more.
| Severity | Reports | Paid | Median | Highest |
|---|---|---|---|---|
| Critical | 40 | 5 | $750 | $16k |
| High | 245 | 39 | $2,000 | $14k |
| Medium | 326 | 47 | $600 | $5,300 |
| Low | 84 | 17 | $497 | $1,000 |
| Informational | 16 | 2 | $1,088 | $1,925 |
| Unrated | 1,280 | 152 | $1,000 | $40k |
Highest-paid reports5
-
$40,000 -
$30,000 -
$22,000
-
$20,000 -
$18,337
Typical fixes
7How programs fixed it, as the reports describe.
-
Reject requests with no Content-Type header and filter the X-Accel-Redirect header in proxy responses.
Seen in 2 reports
-
Sanitise or block embedded script in uploaded SVG files.
Seen in 2 reports
-
$100 Low -
$150 Medium
-
-
Replace suspicious linked account names with a generic string before rendering them.
Seen in 1 report
-
Serve uploaded files with a restrictive Content-Disposition and a non-HTML content type, and sanitise them.
Seen in 1 report
-
Escape user-controlled content in generated HTML exports and add a Content-Security-Policy to the generated file.
Seen in 1 report
Tips for beginners
14Advice for a first hunt, drawn from the reports.
-
Start by mapping all features that accept user input and later display it to others. Focus on profile fields, comments, file uploads, markdown editors, and any place where your input is shown to a different user or an admin. Use a unique marker to track where your input appears.
Seen in 4 reports
-
Test file upload features carefully, especially for SVG files and file names. Upload a file with a name containing HTML markup and check if directory listings or file managers render it unescaped. Also test if uploaded SVGs are served with a content type that allows script execution.
Seen in 4 reports
-
For markdown or rich-text editors, try injecting markup through links, images, or embedded objects. Check if the rendered output executes script, and test bypasses such as using HTML entities or unusual schemes. Pay attention to how the editor sanitises content and whether it can be tricked into allowing dangerous markup.
Seen in 4 reports
-
Look for second-order XSS by submitting payloads through public forms that are reviewed in internal panels. Use a callback or a simple alert to detect execution when an admin views your submission. This is often overlooked and can lead to high-impact findings.
Seen in 4 reports
-
When testing stored XSS, always demonstrate impact. A simple alert box may be considered low impact; show that you can steal a session token, perform actions as the victim, or access sensitive data. Chain with other vulnerabilities like CSRF or IDOR to escalate.
Seen in 3 reports
Guides and techniques
The best explainers, cheat sheets and technique posts on Stored XSS, from around the web.
-
How to find IDOR, stored XSS, information disclosure vulnerabilities – from our #1 hunters for these CWEsTop YesWeHack hunters share methodologies for finding IDOR, stored XSS and information disclosure bugs in bug bounty programmes.
Methodology yeswehack.com
-
How to find IDOR, stored XSS, information disclosure vulnerabilities – from our #1 hunters for these CWEsTop hunters explain their approaches to finding IDOR, stored XSS and information disclosure, with practical hunting tips.
Methodology YesWeHack
-
When File Uploads Break XSS DefensesExplains why stored XSS payloads fire via file uploads but not manual forms, due to inconsistent sanitisation across input paths.
Technique machevalia.blog
-
XSS attacks and exploitation: The ultimate guide to cross-site scriptingComprehensive breakdown of reflected, stored, DOM and blind XSS with detection and exploitation methods for bug bounty hunters.
Explainer yeswehack.com
-
Uploading web.config for Fun and Profit 2Shows how uploading a web.config on IIS can yield command execution and stored XSS in root or subfolders.
Technique soroush.me
Keep learning
Where this lesson fits, and what to read next.
Learning paths
The whole class
Related techniques
How this is made: our model read every listed Stored XSS report in the index (our own summary where we have one, otherwise the title and the platform's label), listed the patterns, and merged them. Each point was kept only if the reports it cites exist, are listed and belong here; payouts are computed from the data, not written by the model. Read the originals before relying on a point. Generated 26 Nov 2026 from 809 reports. All Stored XSS reports.