mizazhaider-ceh/agentarsenal/dom-clobbering
Claude Code and agent skill by mizazhaider-ceh/agentarsenal
- community
Checking that the SKILL.md file is still in the repository.
Use when testing for DOM clobbering on an authorized web
Install
npx vskill@latest install mizazhaider-ceh/agentarsenal/dom-clobberingSKILL.md
The same SKILL.md was published earlier as mizazhaider-ceh/agentarsenal/dom-clobbering.
DOM clobbering turns HTML into JavaScript variables: named elements like <a id="config"> shadow global variables, so injected markup can override the values scripts rely on. This skill covers authorized testing: finding clobberable code, crafting the markup, and escalating to XSS. It needs HTML injection (stored or reflected) as the entry point; the skill covers what to do once you have it.
Quick Workflow
- Find JavaScript that reads globals or DOM properties it does not
own: config.apiUrl, document.scripts, unqualified names.
- Confirm you can inject HTML (any context, even limited).
- Clobber the target name with a named element and verify the
override in the console.
- Chain to impact: override a URL used in fetch, a template used in
innerHTML, or a script source.
- Escalate to XSS where a clobbered value flows into a sink.
- Check multi level clobbering: form elements clobbering form
properties.
- Document the injection point, the clobber markup, and the sink.
- Recommend the fixes: no unqualified global reads, sanitize HTML.
1. Finding clobberable code
2. Escalation patterns
Edge cases
- The page uses
document.getElementByIdstrictly. Duplicate IDs
still clobber getElementById in some browsers; test, do not assume.
- Content Security Policy blocks the injected script. Clobbering to
redirect a fetch or form still works without script execution.
- The injection point strips ids and names. Try other clobberable
vectors (form actions, embed src) or move on.
- Frameworks (React, Angular) usually avoid the vulnerable patterns;
legacy jQuery era code is where this lives.
Escalation
- Simple clobber blocked by sanitizer: try nested or malformed
markup the sanitizer mishandles.
- No HTML injection at all: DOM clobbering needs markup; without it,
this skill does not apply.
- Gadget needs script execution: combine with a prototype pollution
gadget where available.
Detection and defender view
Defenders see DOM clobbering as HTML injection payloads containing id and name attributes that match the app's JavaScript variable names. Detect with CSP violation reports and with monitoring for unexpected global overrides in client telemetry. The durable fix is code hygiene: never read security relevant values from unqualified globals, sanitize all injected HTML, and use closed shadow DOM or modules where practical.
Key references
- CWE-79 (Cross-site Scripting): the escalation target.
- CWE-20 (Improper Input Validation): the HTML injection entry.
- DOM clobbering research (PortSwigger, Black Hat presentations).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/web/dom-clobbering/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mizazhaider-ceh/agentarsenal/dom-clobbering)