CWE-1076: Insufficient Adherence to Expected Conventions
The product's architecture, source code, design, documentation, or other artifact does not follow required conventions.
Last updated
Overview
CWE-1076 (Insufficient Adherence to Expected Conventions) is a class-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.
Real-world CVEs
2 recorded CVEs are caused by CWE-1076 (Insufficient Adherence to Expected Conventions). The highest-severity and most recent are shown first.
Common consequences
What can happen when CWE-1076 is exploited.
Reduce Maintainability
Affects: Other
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to detect it
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Code examples
Illustrative examples from MITRE showing how the weakness appears in code.
The usage of symbolic names instead of hard-coded constants is preferred.
Vulnerable example
char buffer[1024];Safe example
enum { MAX_BUFFER_SIZE = 1024 };The following code fragment calls finalize() explicitly:
Vulnerable example
// time to clean upFrequently asked questions
Common questions about CWE-1076.
- What is CWE-1076?
- The product's architecture, source code, design, documentation, or other artifact does not follow required conventions.
- What CVEs are caused by CWE-1076?
- 2 recorded CVEs are attributed to CWE-1076, including CVE-2021-1268, CVE-2023-32642.
- How is CWE-1076 detected?
- Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
- What are the consequences of CWE-1076?
- Exploiting CWE-1076 can lead to: Reduce Maintainability.
- Is CWE-1076 actively exploited?
- 2 recorded CVEs are caused by CWE-1076; none are currently in CISA's KEV catalog of actively exploited flaws.
References
- MITRE CWE definition (CWE-1076) (opens in a new tab)
- CWE-1076 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Stay ahead of CWE-1076
Get alerted the moment a new CWE-1076 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.