Mon, July 27, 2026

Code Audit — PHP XSS

1. XSS Vulnerability Basics

Cross-Site Scripting (XSS) is an attack where malicious scripts are injected into a trusted website. When other users visit the site, the script executes in their browser, enabling cookie theft, session hijacking, phishing, and more.

XSS is categorized by storage location:

  • Reflected XSS: the malicious script resides in request parameters; the server echoes it directly without storing it.
  • Stored XSS: the malicious script is persisted in a database or file and triggers on every page visit.
  • DOM-based XSS: a purely client-side vulnerability that never touches the server. PHP audits typically focus only on the first two types.
Older notes
Anno
2026
9 letters