Berildocs GitHub

Memory cards

DOM clobbering turns an id into a variable

confidence: mediumupdated: 2026-11-24status: activewebdomclobbering

Claim#

A named element or form overrides a global property that the script trusts, such as config or a function.

Test#

Look for document.getElementById fallbacks, window.name, and unqualified globals. Inject an element with the expected id.

Proof#

A script reads attacker-controlled markup as a config or a URL.

Failure modes#

A unique id that is never read as a variable is not clobberable. Modules reduce the surface.