CWE-491
Public cloneable() Method Without Final ('Object Hijack')
AI Translation Available
A class has a cloneable() method that is not declared final, which allows an object to be created without calling the constructor. This can cause the object to be in an unexpected state.
Status
draft
Abstraction
variant
Affected Platforms
Java
Technical Details
AI Translation
Common Consequences
integrity
other
Impacts
unexpected state
varies by context
Detection Methods
automated static analysis
Potential Mitigations
Phases:
implementation
Descriptions:
•
Make the cloneable() method final.