Home / Knowledge Base / Glossary / XSS: Cross-Site Scripting in Simple Terms

XSS: Cross-Site Scripting in Simple Terms

Glossary 3 min read Updated 27.07.2026
What XSS is and why this vulnerability is not in the server, but in data output. What it threatens businesses and rankings, how the finding appears in the Shield report, and how to close it.

XSS (cross-site scripting) is when an outsider manages to execute their code on the pages of your site in the visitor's browser. The vulnerability is not in the server, but in how the site displays data coming from outside: from the address, form, comment, or profile.

Analogy for a Site Owner

Imagine a bulletin board at the entrance of a store. If someone brings a note saying, "give the keys to the cash register to the bearer," and you hang it up without reading — the employee will follow someone else's instructions as if they were yours. XSS works the same way: the site inserts foreign text into the page as its own, and the browser executes everything that is there, fully trusting your domain.

Types of XSS

TypeWhere It LivesAffects
ReflectedThe value from the address or form is returned directly in the HTML responseThe one who clicked on the prepared link
StoredForeign text is stored in the database — comment, review, profile nameEveryone who opens this page
DOM-basedThe site's scripts themselves insert data from the address into the markupVisitors, while there are no traces in the server response

What It Threatens

  • Session Hijacking. A foreign script reads cookies and logs into the account or admin panel on behalf of the user.
  • Spam and Hidden Links. The site starts promoting foreign topics and loses search trust.
  • Label in Browser and Search Results. If malicious code was injected through the vulnerability, the domain ends up in databases of unsafe sites, the visitor sees a warning "this site may harm you," and the pages drop out of the index.

How It Looks in the Security Shield Report

The scanner inserts a harmless marker into the page parameters and checks if it returns in the HTML without escaping. If it does return — a finding "Indication of Reflected XSS" appears: medium severity, CWE-79 class, OWASP A03:2021 category. The note "requires verification" means that the service sees the surface but does not exploit it.

Active probes only occur in paid modes and on verified domains — a quick free check does not perform them. What else is checked is described in the article about Security Shield.

What to Do with the Finding

Open the address and parameter from the "Where Found" line and ask the developer to check if this value is escaped when outputting. Reflecting raw values in HTML is a signal that there is no filter here.

How to Close It

  1. Escape Output. Data from the user undergoes contextual encoding before being inserted into HTML: <, >, quotes, and ampersands are turned into safe sequences. In template engines, this is one setting.
  2. Check What Comes In. If the parameter is a number, accept only numbers. For texts with markup, use a verified HTML cleaning library.
  3. Enable CSP — even with a mistake in the template, it will prevent a foreign script from executing. How to start is described in the article about security headers.
  4. Close Cookies with HttpOnly and Secure flags, so the session cannot be read from JavaScript.
  5. Update CMS, Theme, and Plugins. Most XSS on typical sites comes from foreign extensions.

How to Prevent It from Happening Again

The rule is simple: every new field that the visitor sees goes through the same safe output as the others. Keep CSP enabled, repeat scans after releases and plugin installations. An SEO audit is also useful: a sudden increase in the number of external links often turns out to be the first sign of an injection.

FAQ

How does XSS differ from website hacking?
In XSS, foreign code runs in the visitor's browser, not on your server. But through this hole, access to the admin panel is often gained — and then it ends in a real hack.
Is one CSP enough to close XSS?
No. CSP is a second line of defense: it prevents a foreign script from executing, but does not fix the output error itself. You need to start with escaping data.
Why is there a note "requires verification" in the report?
The scanner sees that the parameter value returned in HTML without escaping, but does not conduct an attack. The developer must confirm and assess the risk.
Try it on your project Everything described in the article is available in the dashboard — the registration bonus is already in your balance.
Open dashboard
Was this article helpful? Thank you! We will consider this in future updates.