Local Scope Pollution & Data Exposure

Direct `eval()` executes code within the current local scope, which means injected malicious code could read or modify local variables and sensitive data, bypassing intended access controls. `new Function()` typically executes in the global scope.

Sources

Open the full topic