TK Study

Software Engineering › Key terms › Y12 Secure Software Architecture › Cross-site scripting (XSS)

Cross-site scripting (XSS)

Term Key terms bank Y12 Secure Software Architecture

Also listed as: XSS

Definition

An attack that injects malicious script into a web page that other users then run in their browser. Prevent it by sanitising and escaping output.

Example: Escape user comments so scripts cannot run.

Found in: syllabus, course specifications, sample exam and familiarisation guidelines, school notes.

Short version to memorise (key terms bank)

Cross-site scripting: malicious script injected into a page other users view.

Where it is used in the test

Syllabus area: Y12 Secure Software Architecture.

Question types it can appear in

Where it has appeared in the paper

Secure Software Architecture (Part C). Part letters follow each paper’s own layout.

Related past questions

These are the questions the flashcard set links to this term. Open each one and compare your answer with its marking criteria.

Study links

How to use it in an answer

A model sentence

General advice, built from the definition and example above

“An attack that injects malicious script into a web page that other users then run in their browser.” Then apply it: Escape user comments so scripts cannot run.

In a short answer, give the definition in your own words first, then tie it to the situation in the question. Do not copy the example above unless it fits the scenario.

Command words used with it

From the linked past questions
  • Identify: Recognise and name. (Familiarisation Q11a (1 mark): Cross-site scripting)
  • Explain: Relate cause and effect; make the relationship between things evident; provide why and/or how. (Familiarisation Q11b (2 marks): Cross-site scripting)

Technique for the question types

What the marking guidelines and feedback say

Familiarisation Q11b (2 marks): Cross-site scripting

Note (MG): special characters such as < > and ( ) would be encoded to their HTML equivalent (%3C %3E and %28 %29).

Worked answers from the marking guidelines

Familiarisation Q11a (1 mark): Cross-site scripting (1 mark): criteria and sample answer

Criteria

1: Identifies the correct answer.

Sample answer

Cross site scripting

Open the question page

Familiarisation Q11b (2 marks): Cross-site scripting (2 marks): criteria and sample answer

Criteria

2: Explains ONE way to minimise the vulnerability. 1: Some relevant information.

Sample answer

The website could check and change user input so that markup and script become plain text. This will still allow the page to display the information but will prevent it from executing script code.

Open the question page

Common mistakes

General advice
  • Use the term exactly as the syllabus words it, then link it to the scenario in the question; the 2025 feedback repeatedly rewards using the stimulus.
  • Answer the command word: outline gives main points only, explain gives a reason or cause, discuss gives both sides.

Same group in the syllabus: Broken authentication and session management · Cross-site request forgery (CSRF) · Invalid forwarding and redirecting · Race condition · File attacks · Side channel attack