CWE-482: Comparing instead of Assigning
VariantLikelihood of exploit: Low
The code uses an operator for comparison when the intention was to perform an assignment.
In many languages, the compare statement is very close in appearance to the assignment statement; they are often confused.
Consequences
- Availability, Integrity: Unexpected State
How to prevent it
- Testing: Many IDEs and static analysis products will detect this problem.
Recent advisories
- GHSA-33mp-8p67-xj7c — Froxlor has Admin-to-Root Privilege Escalation via Input Validation Bypass + OS Command Injection
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor