Detailedlikelihood: Lowseverity: Very HighDraft

CAPEC-108Command Line Execution through SQL Injection

Abstraction
Detailed
Status
Draft
Likelihood
Low
Severity
Very High

Description

An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.

Related weaknesses· 5

CWE-89CWE-74CWE-20CWE-78CWE-114

Related attack patterns· 1

CAPEC-66 (ChildOf)

Exploits5

TypeTargetConfidenceTier
WeaknessImproper Neutralization of Special Elements used in an SQL Command ('SQL Injection')cwe-89100%live
WeaknessImproper Input Validationcwe-20100%live
WeaknessImproper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')cwe-74100%live
WeaknessProcess Controlcwe-114100%live
WeaknessImproper Neutralization of Special Elements used in an OS Command ('OS Command Injection')cwe-78100%live

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CAPEC
SQL Injection
CAPEC
Expanding Control over the Operating System from the Database
CAPEC
Command Injection
CAPEC
OS Command Injection
CAPEC
XQuery Injection
CAPEC
Command Delimiters
Sourced from MITRE CAPEC. Curated by Adam Lundqvist, SQUR.