Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 585 Bytes

vulnerable-code-12.md

File metadata and controls

13 lines (7 loc) · 585 Bytes

SecurityExplained S-24: Vulnerable Code Snippet - 12

Vulnerable Code:

Vulnerable Code

Solution:

The code is vulnerable to prototype pollution that could even lead to remote code execution. The statement in line 12 uses a dangerous pattern that allows for Prototype Pollution. When type is set to proto, then id and content can specify a key and value that will be set on Object.prototype.

Code Credits: SonarSource

Follow Twitter Thread