CWE-480 · Słabość
Use of Incorrect Operator
- Abstrakcja
- Bazowa
- Status
- Szkic
- Ryzyko wykorzystania
- niskie
- Dodano
- 19 lipca 2006
- Ostatnia zmiana
- 11 grudnia 2025
Opis
The product accidentally uses the wrong operator, which changes the logic in security-relevant ways.
These types of errors are generally the result of a typo by the programmer.
Skutki
Other
Alter Execution Logic
This weakness can cause unintended logic to be executed and other unexpected application behavior.
Przykłady podatności
- CVE-2022-3979 Chain: data visualization program written in PHP uses the "!=" operator instead of the type-strict "!==" operator (CWE-480) when validating hash values, potentially leading to an incorrect type conversion (CWE-704)
- CVE-2021-3116 Chain: Python-based HTTP Proxy server uses the wrong boolean operators (CWE-480) causing an incorrect comparison (CWE-697) that identifies an authN failure if all three conditions are met instead of only one, allowing bypass of the proxy authentication (CWE-1390)
Słabość nadrzędna
Słabości podrzędne
Kiedy powstaje
- Implementation
Dotyczy
C, C++, Perl, Not Language-Specific
Źródła
- The CLASP Application Security Process — Secure Software, Inc., 2005
- The Art of Software Security Assessment — Mark Dowd, John McDonald, Justin Schuh, Chapter 6, "Typos", Page 289, Addison Wesley, 2006
- csr_regile.sv line 938 — 2021
- Fix for csr_regfile.sv line 938 — 2021
Wpis z katalogu CWE 4.20.