Pick a payload, choose the vulnerable or hardened deepMerge,
and run it into a fresh empty object. Then we probe a brand-new {} to see whether
Object.prototype was polluted globally.
const probe = {}Run a merge to inspect…
Pollution alone is silent. The impact comes when existing code reads a property it
expects to be absent. Below, two implementations of canEdit(options = {}) are called
with an empty options object — watch how the polluted isAdmin flips one of them.
function canEdit(o = {}) {
return o.isAdmin === true;
}
canEdit({})
function canEdit(o = {}) {
return Object.hasOwn(o, 'isAdmin')
&& o.isAdmin === true;
}
canEdit({})
Pollute via section 1 with isAdmin: true, then watch the vulnerable gadget return
true for an empty object — an auth bypass with no script injected.
Own keys currently sitting on the shared Object.prototype (should be empty when clean).
clean