If a Servlet fails to catch all exceptions, it may reveal debugging
information that will help an adversary form a plan of attack. In the
following method a DNS lookup failure will cause the Servlet to throw an
exception.
When a Servlet throws an exception, the default error response the
Servlet container sends back to the user typically includes debugging
information. This information is of great value to an attacker.
Potential Mitigations
Phase
Description
Handle all possible situations (e.g. error condition).
If an operation can throw an Exception, implement a handler for that
specific exception.
Other Notes
When an exception is thrown and not caught, the process has given up an
opportunity to decide if a given failure or event is worth a change in
execution.