CWE-1126

Declaration of Variable with Unnecessarily Wide Scope

Medium

Description

The source code declares a variable in one scope, but the variable is only used within a narrower scope.

Potential Impact

Detection Methods

Related Weaknesses

References

View on MITRE CWE Database →

Need Help Fixing This Vulnerability?

Our security experts can help you identify and remediate CWE-1126 vulnerabilities in your codebase.

Get Security Assessment