Skills

Dangling Markup Injection

Dangling markup injection playbook.

Install

npx skills add yaklang/hack-skills --skill dangling-markup-injection -g -a claude-code -y
Repository
yaklang/hack-skills2.6k
Category
Engineering
Updated
2mo ago
License
MIT
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Dangling markup injection playbook. Use when HTML injection is possible but JavaScript execution is blocked (CSP, sanitizer strips event handlers, WAF blocks script tags), exfiltrate CSRF tokens, session data, and page content by injecting unclosed HTML tags that capture subsequent page content.

SKILL: Dangling Markup Injection, Exfiltration Without JavaScript

AI LOAD INSTRUCTION: Covers dangling markup exfiltration via unclosed img/form/base/meta/link/table tags, what can be stolen (CSRF tokens, pre-filled form values, sensitive content), browser-specific behavior, and combinations with other attacks. Base models often overlook this technique entirely when CSP blocks scripts, jumping to "not exploitable", dangling markup is the answer.

0. RELATED ROUTING


1. WHEN TO USE DANGLING MARKUP

You need dangling markup when ALL of these are true:

  1. You have an HTML injection point (reflected or stored)
  2. JavaScript execution is blocked:
    • CSP blocks inline scripts and event handlers
    • Sanitizer strips <script>, onerror, onload, etc.
    • WAF blocks known XSS patterns
  3. The page contains sensitive data AFTER your injection point:
    • CSRF tokens
    • Pre-filled form values (email, username, API keys)
    • Session identifiers in hidden fields
    • Sensitive user content

Core insight: You don't need JavaScript to exfiltrate data, you just need the browser to make a request that includes the data in the URL.


2. CORE TECHNIQUE

Read the whole SKILL.md on GitHub

More in Engineering