Java Script prototypes and inheritance
Summary: PortSwigger Research explains that JavaScript uses prototypal inheritance, where every object is linked to a prototype and inherits its properties unless it defines its own with the same key. The article notes that objects inherit from all objects up the prototype chain back to Object.prototype, whose prototype is null, and that the __proto__ property serves as a de facto standard getter and setter for an object's prototype.
What's compelling: The same __proto__ accessor that lets developers read and reassign a prototype is the mechanism behind prototype pollution, the vulnerability class the article points to next - so a language feature treated as ordinary plumbing becomes the attack surface.
Read the original at PortSwigger Research ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026