Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
Security & accessibilityMiddleOccasionalTheory

How do injection, cross-site scripting and cross-site request forgery differ as test risks?

Answer

Injection makes untrusted data alter an interpreter command; XSS executes attacker-controlled content in a browser context; CSRF causes an authenticated browser to send an unwanted request. Their preconditions, evidence and controls differ.

Strong answer includes

  • distinct execution contexts
  • preconditions
  • control-aware testing

Practical example

A tester confirms an app is safe from CSRF because it checks an anti-CSRF token, but still finds a stored XSS in a comment field that lets an attacker's script run in other users' browsers and silently submit authenticated requests on their behalf — showing that a fix for one class of risk says nothing about the others.

#injection#xss#csrf

Sources

OWASP Web Security Testing GuideOWASP · Web application security test coverageOWASP Top 10 — 2025OWASP · Current web application risk categories