Property
Languagejavascript
Severitymedium
CWECWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code (‘Eval Injection’)
OWASPA03:2021 - Injection
Confidence LevelLow
Impact LevelMedium
Likelihood LevelMedium

Description#

Using require() with a variable (non-literal) argument can let attackers control which files or modules your code loads at runtime. This makes it possible for untrusted input to determine what code is executed.

Impact#

If exploited, an attacker could load and execute malicious code or access sensitive files on the server, potentially leading to data theft, system compromise, or further attacks against your application and its users.