CWE-1025: Comparison Using Wrong Factors

What is CWE-1025?

CWE-1025 is Comparison Using Wrong Factors. The flaw arises when the code performs a comparison between two entities, but the comparison examines the wrong factors or characteristics of the entities. The database currently holds 16 vulnerabilities mapped to CWE-1025 and none of them are in the CISA Known Exploited Vulnerabilities catalog.

OWASP Top 10 Rank-
Related CVES (365 days)16
AbstractionClass
Likelihood of exploit-

Vulnerabilities mapped to CWE-1025

16 vulnerabilities433% increase year over year

No data

No vulnerability data in CISA KEV for CWE-1025

Official definition

ByMitre CWE

The code performs a comparison between two entities, but the comparison examines the wrong factors or characteristics of the entities.

Characteristics

Modes of introduction

  • Implementation

Common consequences

ImpactScopeExplanation
Varies by ContextOtherThis 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.

Detection methods

MethodApproachEffectiveness
Manual Static AnalysisThoroughly test the comparison scheme before deploying code into production. Perform positive testing as well as negative testing.-
Sources (2)

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.