Skip to content

External Control of System or Configuration Setting

Description

Allowing external control of system settings can disrupt service or cause an application to behave in unexpected, and potentially malicious ways. An attacker could cause an error by providing a nonexistent catalog name or connect to an unauthorized portion of the database.

Examples

Insecure Code

scala
$TAINTED = ($REQ: HttpServletRequest).getParameter(...);
...
($CONN: java.sql.Connection).setCatalog($TAINTED);

Secure Code

scala
$validatedInput = validateUserInput($REQ.getParameter(...));
...
($CONN: java.sql.Connection).setCatalog($validatedInput);

Remediation

Validate and sanitize user input before using it to set system settings, such as database catalog names.

Rule Details

FieldValue
IDCODE-0075
CategoryInsecureConfig
SeverityHIGH
CWECWE-15
ConfidenceHIGH
ImpactHIGH
LikelihoodMEDIUM
ExploitabilityMODERATE
Tagsexternal control, system settings, database security
OWASPN/A