BaseIncomplete

CWE-1025Comparison Using Wrong Factors

Category: other

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· 1

  • Other — Varies by Context
    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.

References

  1. https://cwe.mitre.org/data/definitions/1025.html

(incoming)2

TypeTargetConfidenceTier
VulnerabilityCVE-2025-25306cve-2025-253060%live
VulnerabilityCVE-2026-40880cve-2026-408800%live

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
Incomplete Comparison with Missing Factors
CWE
Incorrect Comparison
CWE
Comparison of Incompatible Types
CWE
Comparing instead of Assigning
CWE
Inaccurate Source Code Comments
CWE
Floating Point Comparison with Incorrect Operator
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.