Skip to content
Back to skills

Dom Clobbering

ASecurity

DOM clobbering — injecting named HTML elements (id/name) that overwrite JavaScript variables/globals to bypass client-side logic or reach a sink, used when HTML injection is possible but script is sanitized. Tier 1. Payloads: payloads/client-side.md. Use when you can inject sanitized HTML (allowed tags/attributes) but not script.

  • 16 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 17, 2026
securityjavascriptjavabackendsecurity

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill dom-clobbering --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dom Clobbering?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dom Clobbering
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-dom-clobbering/badge)](https://www.skillsdirectory.com/skills/anandjogawade-dom-clobbering)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dom-clobbering
description: "DOM clobbering — injecting named HTML elements (id/name) that overwrite JavaScript variables/globals to bypass client-side logic or reach a sink, used when HTML injection is possible but script is sanitized. Tier 1. Payloads: payloads/client-side.md. Use when you can inject sanitized HTML (allowed tags/attributes) but not script."
---

# DOM Clobbering

When markup injects but script is filtered, named elements can clobber JS globals to subvert client logic.

## Trigger phrases
`dom clobbering, clobber variable, named element injection, sanitized html bypass`

## Method
1. Confirm you can inject HTML with `id`/`name` attributes (sanitizer allows anchors/forms/images).
2. Clobber a global the app reads: `<a id=x>`, `<a id=x name=y>`, `<form name=config><input name=url value="//attacker"></form>`, `<img name=getElementById>` (clobber a function), nested `id`/`name` for property chains (`config.url`).
3. Drive the clobbered value into a sink (script src, config, redirect) → XSS (→ `dom-xss`) or logic/auth bypass.
4. **Modern:** `document.currentScript` clobbering in bundler shims; two-element property-chain clobbering.

## Escalation
DOM XSS or bypass of a client-side security check when full XSS is blocked by CSP/sanitizer.

## Backend & tooling
Preferred Kali path or headless browser for client-side execution/evidence; if a Burp MCP is present, proxy traffic for visibility and send PoCs to Repeater (see `zazy-orchestrator`).

## Verification (background, before reporting)
Reproduce in a real browser / second context and confirm impact before marking CONFIRMED; use OAST for blind cases. Report true positives only.

## Evidence
The injected named elements, the clobbered variable, and the resulting sink/bypass.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.