Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)

Property
Languagejavascript
Severitylow
CWECWE-78: Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)
OWASPA01:2017 - Injection
Confidence LevelLow
Impact LevelLow
Likelihood LevelLow

Description

Using child_process.spawn or spawnSync with {shell: true} (or a variable shell option) runs commands through a shell, which exposes your code to command injection risks if any input is not fully trusted. This makes it easier for attackers to execute unintended or malicious commands.

Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)

Property
Languagejavascript
Severityhigh
CWECWE-78: Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)
OWASPA01:2017 - Injection
Confidence LevelMedium
Impact LevelHigh
Likelihood LevelMedium

Description

The code executes system commands using user-controlled input without proper validation or sanitization. This allows attackers to inject malicious commands by manipulating the input data passed to functions like exec or spawn.

Impact

If exploited, an attacker could run arbitrary commands on the server, potentially gaining unauthorized access, stealing sensitive data, or disrupting system operations. This could lead to data breaches, loss of control over the server, or further compromise of the infrastructure.

Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)

Property
Languagejavascript
Severitymedium
CWECWE-78: Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)
OWASPA01:2017 - Injection
Confidence LevelMedium
Impact LevelHigh
Likelihood LevelLow

Description

This code uses Deno.run() to execute system commands where part of the command comes from user input or a variable, instead of a fixed string. This allows attackers to inject malicious commands if the input is not properly sanitized.

Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)

Property
Languagejavascript
Severitymedium
CWECWE-78: Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)
OWASPA01:2017 - Injection
Confidence LevelLow
Impact LevelHigh
Likelihood LevelLow

Description

Passing untrusted user input directly to the shelljs exec() function allows attackers to execute arbitrary system commands on your server. This happens when user data is not properly validated or sanitized before being used in command execution.

Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)

Property
Languagephp
Severitymedium
CWECWE-78: Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)
OWASPA01:2017 - Injection
Confidence LevelLow
Impact LevelHigh
Likelihood LevelLow

Description

Using eval() with dynamic, non-constant input allows execution of arbitrary PHP code. This makes it possible for attackers to inject and run malicious code if they control the input.

Impact

If exploited, an attacker could execute any PHP code on your server, potentially leading to data theft, server compromise, or complete takeover of the application. This poses a serious risk to both application integrity and user data.

Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)

Property
Languagephp
Severityhigh
CWECWE-78: Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)
OWASPA03:2021 - Injection
Confidence LevelMedium
Impact LevelHigh
Likelihood LevelMedium

Description

The application takes user input and passes it directly to a function that runs shell commands, without proper sanitization. This allows attackers to inject malicious commands into the system.

Impact

If exploited, an attacker could execute arbitrary commands on the server, potentially gaining access to sensitive data, modifying files, or taking control of the server. This can lead to data breaches, service disruption, or full system compromise.

Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)

Property
Languagephp
Severitymedium
CWECWE-78: Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)
OWASPA03:2021 - Injection
Confidence LevelLow
Impact LevelHigh
Likelihood LevelLow

Description

These functions can lead to command execution if the data inside them is user-controlled. Don’t use the input directly or validate the data properly before passing it to these functions.

Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)

Property
Languagepython
Severitymedium
CWECWE-78: Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)
OWASPA01:2017 - Injection
Confidence LevelLow
Impact LevelHigh
Likelihood LevelLow

Description

Using string formatting or concatenation to build Bash commands in Airflow’s BashOperator can let user-controlled input end up in shell commands. This exposes your code to command injection if any variable used is not fully trusted.

Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)

Property
Languagepython
Severitymedium
CWECWE-78: Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)
OWASPA01:2017 - Injection
Confidence LevelMedium
Impact LevelMedium
Likelihood LevelMedium

Description

User input from HTTP requests is being passed directly to Python’s os.exec* functions to spawn system processes. This allows attackers to control system commands executed by the application, making it highly insecure.

Impact

An attacker could execute arbitrary system commands on the server, leading to data theft, server compromise, or complete system takeover. This can result in loss of sensitive data, service disruption, and significant reputational or financial damage.

Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)

Property
Languagepython
Severityhigh
CWECWE-78: Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)
OWASPA01:2017 - Injection
Confidence LevelMedium
Impact LevelHigh
Likelihood LevelHigh

Description

User input from HTTP requests is being passed directly to system commands using functions like os.system or os.popen. This is insecure because attackers can manipulate inputs to execute arbitrary commands on the server.

Impact

If exploited, an attacker could run malicious commands with the application’s privileges, potentially leading to data theft, server compromise, or complete system takeover. This can result in data breaches, service disruption, and significant harm to the organization.