Skip to content

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.

reports cited in this lesson
609

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.

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.

Year by year

13 years

What each year's disclosed reports show, newest first. A year with few reports says less.

Reports per yearPeak 2025: 284
Reports per year
20011
20081
20091
20103
20114
20123
201311
201428
201551
201696
2017115
201879
201972
2020118
2021104
2022110
2023128
2024120
2025284
2026251
  1. 2026

    251 reports · median $900

    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.
    and 3 more
  2. 2025

    284 reports · median $250

    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.
    and 2 more
  3. 2024

    120 reports · median $600

    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.
    and 3 more
Every point, year by year

Where it is found

33

The features and places the reports found it in, most-reported first.

  1. Static file servers that render directory indexes in HTML.

    Seen in 5 reports
  2. Ad server inventory, conversion statistics and tracker names.

    Seen in 4 reports
  3. SVG file uploads rendered in management interfaces.

    Seen in 3 reports
  4. Kubernetes proxy endpoints in self-hosted GitLab.

    Seen in 2 reports
  5. Markdown rendering with placeholder replacement.

    Seen in 2 reports
View all 33

Root causes

88

The mistakes in the code or configuration behind the reports.

  1. Stored input was inserted into the page without output encoding or sanitisation.

    Seen in 3 reports
  2. A currency formatting value was stored and rendered into admin pages without output encoding.

    Seen in 2 reports
  3. The question edit view rendered the stored product name as raw HTML without sanitising or escaping it.

    Seen in 2 reports
  4. The label colour value from imported data was inserted into the page without sanitisation.

    Seen in 2 reports
  5. SVG uploads were accepted and rendered without sanitising or blocking embedded script.

    Seen in 2 reports
View all 88

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

Other

of 3 ticked
More in Other

Profile fields and display names

of 3 ticked
  • Seen in 11 reports
  • Seen in 3 reports
  • Seen in 2 reports
More in Profile fields and display names

CI and developer tooling

of 3 ticked
More in CI and developer tooling

Admin panels and staff views

of 3 ticked
More in Admin panels and staff views
View more things to try

Bypasses and variations

18

How reports got past filters, encoders and other defences.

  1. Bypass the content security policy through markdown placeholder replacement inside a span tag.

    Seen in 2 reports
  2. A link filter was bypassed by doubling characters.

    Seen in 1 report
  3. A web application firewall that filtered HTML tags was bypassed using an HTML comment.

    Seen in 1 report
  4. An input filter only blocked literal angle brackets and did not decode HTML entities before checking, allowing a bypass.

    Seen in 1 report
  5. An injected approval rule name executed despite the site's content security policy.

    Seen in 1 report
View all 18

Payouts

262 paid

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

SeverityReportsPaidMedianHighest
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

Typical fixes

7

How programs fixed it, as the reports describe.

  1. Reject requests with no Content-Type header and filter the X-Accel-Redirect header in proxy responses.

    Seen in 2 reports
  2. Sanitise or block embedded script in uploaded SVG files.

    Seen in 2 reports
  3. Replace suspicious linked account names with a generic string before rendering them.

    Seen in 1 report
  4. Serve uploaded files with a restrictive Content-Disposition and a non-HTML content type, and sanitise them.

    Seen in 1 report
  5. Escape user-controlled content in generated HTML exports and add a Content-Security-Policy to the generated file.

    Seen in 1 report
View all 7

Tips for beginners

14

Advice for a first hunt, drawn from the reports.

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
View all 14

Guides and techniques

The best explainers, cheat sheets and technique posts on Stored XSS, from around the web.

Keep learning

Where this lesson fits, and what to read next.

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.