vendor:
N/A
by:
Anonymous
7.5
CVSS
HIGH
Inlining Vulnerability
20
CWE
Product Name: N/A
Affected Version From: N/A
Affected Version To: N/A
Patch Exists: No
Related CWE: N/A
CPE: N/A
Metasploit:
N/A
Other Scripts:
N/A
Platforms Tested: N/A
2020
Array.prototype.reverse Inlining Vulnerability
Array.prototype.reverse can be inlined and may invoke EnsureNonNativeArray to convert the prototype of 'this' to a Var array. To make that happen, the prototype must be a native array. But this usually can't be fulfilled, since once it's set as a prototype, it gets converted to a Var array. To bypass this, we can use Array.prototype.sort. By setting it as a prototype in the compare function, we can make an object that its prototype is a native array.
Mitigation:
Avoid using Array.prototype.reverse and Array.prototype.sort in the same code.