This weakness occurs when a software product has an unnecessarily large number of entry and exit points that an attacker can target, exceeding a reasonable and secure threshold.
In security terms, an 'attack surface' is the sum of all the ways an attacker can interact with your application, primarily through inputs (like user forms, APIs, or file uploads) and outputs (like data exports or error messages). A larger attack surface means there are more potential doors and windows for an attacker to try to force open, significantly increasing the risk of a successful breach. It also creates more code paths that developers must secure, raising the chance that a vulnerability might be overlooked. While often discussed for security, a large attack surface also impacts overall software quality and maintenance. For instance, a system with numerous interfaces requires a much larger and more complex testing effort to achieve good code coverage, making it harder to ensure reliability. Therefore, consciously designing and minimizing the attack surface is a key practice for building secure, robust, and maintainable software.