Skip to content

Typo in Operator

Description

The programmer accidentally uses the wrong operator, which changes the application logic in security-relevant ways. This rule also covers some other common typo patterns.

Examples

Insecure Code

c
if (a = b) { /* code */ }

Secure Code

c
if (a == b) { /* code */ }

Remediation

Review the code and correct the typo in the operator.

Rule Details

FieldValue
IDCODE-0653
CategoryGeneric
SeverityMEDIUM
CWECWE-480
ConfidenceLOW
ImpactMEDIUM
LikelihoodMEDIUM
ExploitabilityMODERATE
Tags
OWASPN/A

References