Attacks Dictionary

Cross-site scripting (XSS)

Definition

Cross-site scripting (XSS) injects malicious JavaScript into pages that other users’ browsers will run.

Also called: XSS, cross-site scripting, cross site scripting

Why it matters for WordPress

Stored XSS in a comment, page builder field, or admin notice can run in another user’s browser. For admins, that can mean stolen cookies, forced actions, or malware distribution to visitors.

How it shows up in practice

  • Unexpected popups, redirects, or injected ads on the front end
  • Admin screens that behave oddly after viewing a crafted piece of content
  • Scanner or CVE notes mentioning reflected or stored XSS in a plugin

What to do

  1. Update vulnerable plugins and themes quickly.
  2. Limit who can publish unfiltered HTML.
  3. Sanitize and escape output in custom themes and plugins.
  4. Use a content security policy where practical (hosting or edge).
  5. Treat “odd JavaScript on my pages” as an incident: scan, review recent content, check users.

Full guide: WordPress XSS attacks.

Go deeper

Want the full walkthrough?

This page stays short on purpose. The guide covers steps, examples, and what to check on a live WordPress site.

Open full guide

Nearby ideas in the dictionary

All terms →