--- name: hunt-html-injection description: "Hunt HTML Injection — user-supplied input is rendered as raw HTML in the response without sanitisation, allowing an attacker to inject arbitrary HTML tags (but not necessarily JavaScript). Lower severity than XSS but enables phishing, UI manipulation, and credential harvesting via injected forms. Use when testing text-display surfaces (search results, profile fields, comments, error messages, feedback forms). For markup that executes JavaScript, escalate to hunt-xss." --- ## What is HTML Injection HTML Injection occurs when user input is inserted into a page's HTML without escaping, so injected tags are rendered by the browser as markup rather than displayed as literal text. Unlike XSS, the injected content does not require JavaScript execution — injecting ``, `

`, ``, ``, or `
` tags is sufficient. **To PROVE impact unambiguously, escalate to an active vector carrying a unique numeric canary** — e.g. `">` or ``. A distinctive 4+ digit number (not `alert(1)`) distinguishes YOUR reflected injection from the example payloads practice pages embed in their own hint text. Proof = the raw, unescaped vector with your canary appears in the response. **Impact:** - Phishing via injected `
` or `` tags - UI defacement — `

HACKED

` renders visually on the page - Credential harvesting via injected login forms - Redirect via `` - Stepping stone to XSS (may be blocked by WAF on `` — the same unsanitised input may allow full XSS. ## Proof Confirmed when your injected tag appears in the response body with literal `<` angle brackets (not HTML-encoded). A safe app renders `<b>CANARY</b>`; a vulnerable app renders `CANARY`. ## Distinguishing HTML Injection from XSS - HTML injection: `text` renders as **text** in the browser — no JS execution needed. - XSS: `` executes JavaScript. Some WAFs block `