Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-1078 (不适当的源代码样式或格式) — Vulnerability Class 1

1 vulnerabilities classified as CWE-1078 (不适当的源代码样式或格式). AI Chinese analysis included.

CWE-1078 represents a code quality weakness where source code fails to adhere to established stylistic conventions, such as consistent indentation, whitespace usage, or comment placement. While this flaw rarely enables direct exploitation by external attackers, it significantly increases the risk of logical errors and maintenance failures. Poor formatting can obscure control flow, making it difficult for developers to identify subtle bugs or unintended logic paths during code reviews. This ambiguity may lead to the introduction of vulnerabilities that are harder to detect and patch. To mitigate this risk, development teams should enforce strict coding standards through automated static analysis tools and integrated development environment configurations. Regular linting processes and peer code reviews ensure uniform formatting, thereby enhancing readability, reducing cognitive load, and minimizing the potential for human error during future modifications.

MITRE CWE Description
The source code does not follow desired style or formatting for indentation, white space, comments, etc.
Common Consequences (1)
OtherIncrease Analytical Complexity
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.
Examples (1)
The usage of symbolic names instead of hard-coded constants is preferred.
char buffer[1024]; ... fgets(buffer, 1024, stdin);
Bad · C
enum { MAX_BUFFER_SIZE = 1024 }; ... char buffer[MAX_BUFFER_SIZE]; ... fgets(buffer, MAX_BUFFER_SIZE, stdin);
Good · C
CVE IDTitleCVSSSeverityPublished
CVE-2024-0667 Form-Maker (twb_form-maker) <= 1.15.21 - Cross-Site Request Forgery to Limited Code Execution via Execute — Form Maker by 10Web – Mobile-Friendly Drag & Drop Contact Form Builder 5.4 Medium2024-01-27

Vulnerabilities classified as CWE-1078 (不适当的源代码样式或格式) represent 1 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.