CWE-482: Comparing instead of Assigning
The code uses an operator for comparison when the intention was to perform an assignment.
Overview
In many languages, the compare statement is very close in appearance to the assignment statement; they are often confused.
Real-world CVEs
2 recorded CVEs are caused by CWE-482 (Comparing instead of Assigning). The highest-severity and most recent are shown first. 1 new CWE-482 CVE has been recorded so far in 2026.