This weakness occurs when a codebase depends too heavily on global variables to store and manage state, rather than keeping data within appropriate local scopes like functions or classes.
Excessive use of global variables creates a tightly coupled and fragile architecture. It becomes difficult to track where and how data is modified, leading to unpredictable side effects across the entire application. This lack of encapsulation makes the code harder to understand, test, and debug, as changes in one module can silently break functionality in another. From a security perspective, this poor maintainability indirectly increases risk. It slows down the identification and remediation of actual vulnerabilities because developers must navigate a complex web of dependencies. Furthermore, the constant risk of unintended interactions makes it easier to introduce new security flaws during routine maintenance or feature development.
Impact: Reduce Maintainability