CWE-1025

Comparison Using Wrong Factors

Medium

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.

Potential Impact

How to Fix

Testing

Thoroughly test the comparison scheme before deploying code into production. Perform positive testing as well as negative testing.

Related Weaknesses

References

View on MITRE CWE Database →

Need Help Fixing This Vulnerability?

Our security experts can help you identify and remediate CWE-1025 vulnerabilities in your codebase.

Get Security Assessment