Class · High

CWE-1120: Excessive Code Complexity

The code is too complex, as calculated using a well-defined, quantitative measure.

CWE-1120 · Class Level

Description

The code is too complex, as calculated using a well-defined, quantitative measure.

Potential Impact

Other

Reduce Maintainability, Increase Analytical Complexity

Other

Reduce Performance

Detection Methods

  • Automated Static Analysis High — 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 sea

Frequently Asked Questions

What is CWE-1120?

CWE-1120 (Excessive Code Complexity) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Class-level weakness. The code is too complex, as calculated using a well-defined, quantitative measure.

How can CWE-1120 be exploited?

Attackers can exploit CWE-1120 (Excessive Code Complexity) to reduce maintainability, increase analytical complexity. This weakness is typically introduced during the Implementation phase of software development.

How do I prevent CWE-1120?

Follow secure coding practices, conduct code reviews, and use automated security testing tools (SAST/DAST) to detect this weakness early in the development lifecycle.

What is the severity of CWE-1120?

CWE-1120 is classified as a Class-level weakness (High abstraction). Its actual severity depends on the specific context and how the weakness manifests in your application.