Skip to content

Insecure API Calls

Description

The code uses potentially insecure API functions that can be exploited by attackers. These functions can be used to access sensitive data, execute system commands, or perform other malicious activities.

Examples

Insecure Code

c
strcpy(buffer, user_input);

Secure Code

c
strncpy(buffer, user_input, sizeof(buffer) - 1); buffer[sizeof(buffer) - 1] = '\0';

Remediation

Review the code and replace insecure API calls with secure alternatives. Ensure that all input data is validated and sanitized before passing it to API functions.

Rule Details

FieldValue
IDCODE-0222
CategoryInjection
SeverityHIGH
CWECWE-78
ConfidenceMEDIUM
ImpactHIGH
LikelihoodMEDIUM
ExploitabilityMODERATE
Tagsinsecure-api, code-injection
OWASPN/A

References