The problem illustrates difficulties in blocking client-side assaults. An attack-bypassing Sanitizer API, a built-in browser library for eliminating potentially harmful code from user-controlled input sources. This was made possible by a prototype pollution problem in the Chromium project.
The flaw, which was discovered by security researcher Micha Bentkowski, emphasizes the difficulties in guarding against client-side prototype pollution attacks.
Client-side prototype pollution
Both the server side and the client side (browser) are susceptible to prototype pollution (Node.js servers). While investigating client-side prototype pollution vulnerabilities in Chromium, Bentkowski, who has conducted a substantial study on the subject, found a new flaw.
In place of external libraries like DOMPurify, the Sanitizer API was added to Chromium browsers to provide native sanitization.
According to Bentkowski’s report, the browser’s #enable-experimental-web-platform-features must be activated in order for the vulnerability to function.
According to Bentkowski’s estimation, not many users have this flag activated. However, the user base affected is now larger because Chrome 105 (August 2022) has the Sanitizer API activated by default.
Bug or feature?
Sanitizer API shouldn’t handle the prototype pollution vector, as one vulnerability researcher pointed out in the discussion thread.
The researcher claimed that Environments with contaminated Object prototypes are already compromised. I don’t think selectively hardening chosen web APIs against that will offer much practical advantage and may merely offer a false sense of security, at the expense of API cognitive complexity”.
The prototype chain must be traversed by Web APIs, according to a WebIDL specification, which Bentkowski says he was unaware of before reporting the error.
In fact, it is a feature, and it cannot be modified at the moment because doing so would break many programmes.
Therefore, designers must recognize and eliminate all devices that taint prototypes from user-controlled sources.
Bentkowski’s revelation did, however, lead to some fixes. “Only the SVG example was affected by the problem. This turned out to be the submission’s actual bug, he claimed.
“Prototype pollution was regarded as a ‘feature’ on its own. Bypassing the Sanitizer should not have been possible thanks to the carefully designed configuration object, though.