The vulnerability analysis identified two functions, DOMElement.removeAttributeNS and DOMElement.setAttributeNS, in dom-element.js as being vulnerable to prototype pollution. The root cause is the lack of input validation for the namespace parameter in both functions. An attacker can supply __proto__ as the namespace, which allows them to directly access and manipulate Object.prototype.
In removeAttributeNS, this allows the deletion of properties from Object.prototype, which can break fundamental operations and lead to a denial of service.
In setAttributeNS, this allows the addition or modification of properties on Object.prototype, a more severe form of prototype pollution that can lead to arbitrary code execution.
The vulnerability is present because the code uses the namespace string to access a property of the _attributes object without checking if the string is __proto__. This allows direct access to the object's prototype chain. Since there is no patched version, any version of min-document up to and including 2.19.0 is affected.