CWE-583: finalize() Method Declared Public
The product violates secure coding principles for mobile code by declaring a finalize() method public.
Last updated
Overview
CWE-583 (finalize() Method Declared Public) is a variant-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Common consequences
What can happen when CWE-583 is exploited.
Alter Execution Logic, Execute Unauthorized Code or Commands, Modify Application Data
Affects: Confidentiality, Integrity, Availability
In mobile code situations, the otherwise error-prone practice of manual garbage collection can become a security threat if an attacker can maliciously invoke a finalize() method because it is declared with public access.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
Applies to
Languages
How to prevent it
Practical mitigations for CWE-583, grouped by where in the lifecycle they apply.