DOM clobbering

DOM, or the document object model present in browsers, allows JavaScript to manipulate or access HTML/XML and also structures it. DOM is very powerful in the way that it allows you to change or access the majority of the content inside the web page. However, DOM was initially born and implemented without any standardization which led to a lot of peculiar behavior and for the sake of maintaining compatibility, browsers still support the unusual behavior of DOM. That leads us to DOM clobbering. Due to non-standardized DOM behavior, browsers may sometimes add name and id attributes to various DOM elements as a property reference to document or global objects. However, this results in replacement of properties on the other objects ...

Get Mastering Modern Web Penetration Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.