security-review-owasp-dom-clobbering-prevention

Review HTML sanitization and DOM access patterns for DOM clobbering weaknesses.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/sjinks/ai-owasp-skillset --skill security-review-owasp-dom-clobbering-prevention
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-review-owasp-dom-clobbering-prevention
Source: https://github.com/sjinks/ai-owasp-skillset/tree/main/.github/skills/security-review-owasp-dom-clobbering-prevention
Command: npx skills add https://github.com/sjinks/ai-owasp-skillset --skill security-review-owasp-dom-clobbering-prevention

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps reviewers find DOM clobbering risks where user-controlled HTML, named-property collisions, or unsafe global property reads can alter browser behavior and undermine security decisions.

Core Features & Use Cases

  • Sanitization Review: Checks whether injected HTML is properly sanitized, including protection against dangerous id and name attributes.
  • Global Access Review: Flags unsafe reads from window, document, or implicit globals that may be clobberable by attacker-controlled markup.
  • Review Discipline: Separates confirmed weaknesses from gaps in evidence and produces findings with concrete code-path or behavior references.
  • Use Case: Review a rich-text rendering flow, a client-side router, or a callback lookup path to see whether DOM naming collisions can influence security-critical logic.

Quick Start

Ask the skill to review the target files or flow for DOM clobbering prevention weaknesses and return evidence-based findings, gaps, and passed checks.

Frequently Asked Questions about security-review-owasp-dom-clobbering-prevention

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review HTML sanitization for DOM clobbering vulnerabilities?

Review HTML sanitization for DOM clobbering by checking whether injected markup properly filters dangerous id and name attributes that can collide with browser globals. This process flags unsafe window or document property reads and verifies library protections.

What is DOM clobbering and when do I need to check for named-property collisions?

DOM clobbering is an attack where user-controlled HTML alters browser behavior via named-property collisions. You need to check for it during security audits of rich-text rendering flows, client-side routers, or callback lookup paths where DOM naming can influence security-critical logic.

How do I find unsafe window or document global property reads in JavaScript?

Find unsafe global property reads by reviewing code for implicit globals and direct window or document access that attacker-controlled markup could clobber. The review separates confirmed weaknesses from evidence gaps and produces findings with concrete code-path references.

Does this security review distinguish between confirmed DOM clobbering issues and review gaps?

Yes, the security review explicitly distinguishes between confirmed DOM clobbering issues and gaps in evidence. It requires evidence-backed findings with concrete code-path or behavior references to ensure review discipline and accurate security auditing.

Can I audit client-side routing and callback lookup paths for DOM clobbering risks?

Yes, you can audit client-side routers and callback lookup paths for DOM clobbering risks. The review checks whether DOM naming collisions can influence security-critical logic by evaluating global scoping, type validation, and sanitization controls.

What are the limitations of HTML sanitization when preventing browser global scope collisions?

HTML sanitization limitations arise when dangerous id and name attributes are not properly filtered, allowing named-property collisions to clobber browser globals. The review identifies these gaps by checking global scoping, type validation, and library protection mechanisms.