Web Security · Middle · Question 66 of 75
What is prototype pollution?
- ✓Correct answer: Merging untrusted JSON with keys like
__proto__changesObject.prototypefor the whole app - 2Polluting the global CSS with prototypes of components
- 3Creating too many prototypes with classes
Explanation
A polluted prototype can change checks like if (user.isAdmin) everywhere. Use safe merge functions, Object.create(null) or Map, and schema validation.