Skip to content
StrikeCyberStrikeCyber
Field Manual · Attack technique

Cross-Site Scripting (XSS)

Reviewed November 13, 2026Attack technique 1 min read

Quick answer

Cross-site scripting (XSS) is a web vulnerability that lets an attacker run their own script in another user's browser, within your site. It is used to steal session tokens, act as the victim, capture keystrokes or change what the page shows. Variants are stored, reflected and DOM-based XSS.

On this page
01

How It Works

When an application includes user-supplied content in a page without encoding it for the right context, an attacker's script runs as if it came from your site. Stored XSS persists, for example in a comment or profile field, and affects every viewer; reflected XSS is delivered through a crafted link; DOM XSS happens entirely in client-side code. AI features that render model output as HTML have reintroduced XSS into modern applications.

02

Why It Matters

XSS in an administrative interface can lead to full account takeover. In customer applications it enables fraud and data theft at scale.

03

How to Test for It

  1. Test every place user or third-party content is displayed, including rich text, file names and AI-generated output.
  2. Test client-side code for DOM-based sinks.
  3. Check Content Security Policy and cookie flags.
  4. Confirm impact by demonstrating session or action hijacking in an authorized test.
04

How to Reduce the Risk

Encode output for its context, use frameworks that escape by default, sanitize any allowed HTML with a maintained library, apply a strict Content Security Policy, set HttpOnly and SameSite cookies, and treat AI model output as untrusted.

05

Regulatory and Framework Context

For US organizations, XSS findings in public-facing applications are relevant to PCI DSS and state data protection requirements.

Latest intel on this topic

Updated hourly from the daily briefing.

Common questions

What is the difference between stored and reflected XSS?

Stored XSS is saved by the application and shown to other users; reflected XSS is triggered by a crafted link the victim clicks.

Does a Content Security Policy fix XSS?

A strict policy greatly reduces impact, but the underlying flaw should still be fixed.

For testers: finding write-ups

How this shows up in a penetration test report, with severity, verification and remediation, in the StrikeOps Findings Library.

Change log

  1. November 13, 2026First published.
(877) 657-8496