CWE-561 — Dead Code
CWE-561: Dead Code
MITRE CWE weakness
| Kind | Weakness |
| Abstraction | Base |
| Status | Draft |
| Likelihood of exploit | — |
Description
The product contains dead code, which can never be executed.
Dead code is code that can never be executed in a running program. The surrounding code makes it impossible for a section of code to ever be executed.
Common consequences
- Other: Quality Degradation
- Other: Reduce Maintainability
Mitigations
Implementation — Remove dead code before deploying the application.
References
- CWE page: https://cwe.mitre.org/data/definitions/561.html
- CWE list: https://cwe.mitre.org/data/index.html