CWE•Variant•Draft•0 recent CVEs
CWE-486Comparison of Classes by Name
Description
The product compares classes by name.
Common consequences
- Integrity,Confidentiality,Availability→Execute Unauthorized Code or CommandsThe product could use the wrong class. If the decision to trust the methods and data of an object is based on the name of a class, it is possible for malicious users to send objects of the same name as trusted classes and thereby gain the t
Potential mitigations
- ImplementationUse class equivalency to determine type. Rather than use the class name to determine if an object is of a given type, use the getClass() method, and == operator.