The source code does not follow desired style or formatting for indentation, white space, comments, etc.
Last updated
CWE-1078 (Inappropriate Source Code Style or Formatting) 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.
1 recorded CVEs are caused by CWE-1078 (Inappropriate Source Code Style or Formatting). The highest-severity and most recent are shown first.
What can happen when CWE-1078 is exploited.
Increase Analytical Complexity
Affects: Other
Variations in indentation and other white space, comments, etc. can make it more difficult for human analysts to understand the actual behavior that is being implemented.
Typically introduced during these phases of the software lifecycle.
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.)
Effectiveness: High
An Integrated Development Environment (IDE) or linter can report or highlight this weaknesses.
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 };Common questions about CWE-1078.
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Get alerted the moment a new CWE-1078 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.