CWE-783: Operator Precedence Logic Error
20 CVEs have CWE-783 as their primary weakness. 0 of them are in the CISA KEV catalog. The highest EPSS score among them is 0.803%.
The product uses an expression in which operator precedence causes incorrect logic to be used.
Child of CWE-670: Always-Incorrect Control Flow Implementation
Mitigations
- Implementation: Regularly wrap sub-expressions in parentheses, especially in security-critical code.
Observed examples
- CVE-2026-7270: Chain: calculation expression does not use parentheses to address operator precedence (CWE-783), causing an incorrect calculation (CWE-682) leading to a buffer overflow (CWE-787).
- CVE-2008-2516: Authentication module allows authentication bypass because it uses (x = call(args) == SUCCESS) instead of ((x = call(args)) == SUCCESS).
- CVE-2008-0599: Chain: Language interpreter calculates wrong buffer size (CWE-131) by using size = ptr ? X : Y instead of size = (ptr ? X : Y) expression.
- CVE-2001-1155: Chain: product does not properly check the result of a reverse DNS lookup because of operator precedence (CWE-783), allowing bypass of DNS-based access restrictions.
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-783'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-783'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).