CWE-481: Assigning instead of Comparing
The code uses an operator for assignment when the intention was to perform a comparison.
Last updated
Overview
CWE-481 (Assigning instead of Comparing) is a variant-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Common consequences
What can happen when CWE-481 is exploited.
Alter Execution Logic
Affects: Other
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
Applies to
Languages
How to prevent it
Practical mitigations for CWE-481, grouped by where in the lifecycle they apply.