phpsafe 𝕏 GitHub
Official CA 421DTkQ3TSG3n7F9SkNZj9NxvdFGbypwkctPd2uupump This is the only official address.

Unescaped user input in output (XSS)

Severity: High CWE-79 OWASP A03:2021 Injection rule: xss

Why it matters

Printing raw input lets an attacker inject scripts that run in your visitors' browsers, stealing sessions or changing what they see. Escaping turns special characters into harmless text.

βœ• Vulnerable
echo 'Hello ' . $_GET['name'];
βœ“ Secure
echo 'Hello ' . htmlspecialchars($_GET['name'] ?? '', ENT_QUOTES, 'UTF-8');

How to fix

Wrap output in htmlspecialchars($value, ENT_QUOTES, 'UTF-8').

Scan my code

Paste a file and PHP Safe points to every line that matches this rule.

Scan my code β†’