CWE-486β€”Comparison of Classes by Name

PUBLISHEDweakness recordHigh
released 2006-07-19 Β· last modified 2025-12-11

Metadata

CWE ID:
CWE-486
Abstraction:
Variant
Structure:
Simple
Status:
Draft
Release Date:
2006-07-19
Latest Modification Date:
2025-12-11

Weakness Name

Comparison of Classes by Name

Description

The product compares classes by name, which can cause it to use the wrong class when multiple classes can have the same name.

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 trust afforded to known classes and types.

Common Consequences

Scope:
Integrity, Confidentiality, Availability
Impact:
Execute Unauthorized Code or Commands
Notes:
If a product relies solely on the name of an object to determine identity, it may execute the incorrect or unintended code.

Related Weaknesses