CWE-1025
Comparison Using Wrong Factors
AI Translation Available
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.
Status
incomplete
Abstraction
base
Affected Platforms
Technical Details
AI Translation
Common Consequences
other
Impacts
varies by context
Potential Mitigations
Phases:
testing
Descriptions:
•
Thoroughly test the comparison scheme before deploying code into production. Perform positive testing as well as negative testing.