CWE-460

Improper Cleanup on Thrown Exception

The product does not clean up its state or incorrectly cleans up its state when an exception is thrown, leading to unexpected state or control flow.

Mitigation

Phase: Implementation

Description:

  • If one breaks from a loop or function by throwing an exception, make sure that cleanup happens or that you should exit the program. Use throwing exceptions sparsely.

No CAPEC attack patterns related to this CWE.

Back to CWE stats page