Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Cybersecurity glossary

Cross-site scripting (XSS)

Cross-site scripting is a flaw where text from one user is shown to others as part of a page and runs as script in their browser.

A comment containing a script tag, shown unescaped, runs with the reader's session on that site. It can read the page, act as the reader and send their data elsewhere.

The fix is to escape output for where it is shown, so text stays text, and to add a Content Security Policy as a second layer. Filtering input alone misses the many ways script can be written.

Learn it hands-on

These free lessons teach it with commands to run in a lab of your own and checked tasks. Read them whole with no account.

← All cybersecurity terms