CWE-1025βComparison Using Wrong Factors
PUBLISHEDweakness record
released 2018-03-29 Β· last modified 2026-04-30
Metadata
- CWE ID:
- CWE-1025
- Abstraction:
- Base
- Structure:
- Simple
- Status:
- Incomplete
- Release Date:
- 2018-03-29
- Latest Modification Date:
- 2026-04-30
Weakness Name
Comparison Using Wrong Factors
Description
The code performs a comparison between two entities, but the comparison examines the wrong factors or characteristics of the entities, which can lead to incorrect results and resultant weaknesses.
Common Consequences
- Scope:
- Other
- Impact:
- Varies by Context
- Notes:
- This can lead to incorrect results and resultant weaknesses. For example, the code might inadvertently compare references to objects, instead of the relevant contents of those objects, causing two "equal" objects to be considered unequal.