CWE-597 3 CVEs MITRE definition ↗

CWE-597: Use of Wrong Operator in String Comparison

Overview

CWE-597 (Use of Wrong Operator in String Comparison) documents a weakness type used across vulnerability databases and security assessments. Use the sections below for definition, context, and mapped CVEs.

Security impact
Security impact: Depends on product and context; use CVE records, severity scores, and MITRE guidance to prioritize.

Description

The product uses the wrong operator when comparing a string, such as using "==" when the .equals() method should be used instead.

Applicable platforms

Kind Name Class Prevalence OS / CPE
language Not Language-Specific Undetermined
language Java Undetermined
language JavaScript Undetermined
language PHP Undetermined

Related CVEs in this database

These CVEs are mapped to this weakness in this database and kept for traceability and search.

CVE Published Summary
CVE-2021-4259 2022-12-19 A vulnerability was found in phpRedisAdmin up to 1.16.1. It has been classified as problematic. This affects the function authHttpDigest of the file includes/login.inc.php. The manipulation of the arg…
CVE-2022-36072 2022-09-06 SilverwareGames.io is a social network for users to play video games online. In version 1.1.8 and prior, due to an unobvious feature of PHP, hashes generated by built-in functions and starting with th…
CVE-2021-3797 2021-09-15 hestiacp is vulnerable to Use of Wrong Operator in String Comparison

Previous names

  • Erroneous String Compare (2008-04-11)

Content submission

Name
CWE Content Team
Organization
MITRE
Date
2006-12-15
Version
Draft 5

Content modifications

Date Name Version Importance Comment
2008-07-01 Eric Dalci 1.0 updated Potential_Mitigations, Time_of_Introduction
2008-09-08 CWE Content Team 1.0 updated Description, Relationships
2008-10-14 CWE Content Team 1.0.1 updated Relationships
2009-05-27 CWE Content Team 1.4 updated Demonstrative_Examples
2011-03-29 CWE Content Team 1.12 updated Demonstrative_Examples, Description, Potential_Mitigations
2011-06-01 CWE Content Team 1.13 updated Common_Consequences, Relationships, Taxonomy_Mappings
2012-05-11 CWE Content Team 2.2 updated Demonstrative_Examples, References, Relationships, Taxonomy_Mappings
2014-07-30 CWE Content Team 2.8 updated Relationships, Taxonomy_Mappings
2017-11-08 CWE Content Team 3.0 updated Taxonomy_Mappings
2019-01-03 CWE Content Team 3.2 updated Relationships, Taxonomy_Mappings
2020-02-24 CWE Content Team 4.0 updated Relationships
2020-08-20 CWE Content Team 4.2 updated Relationships
2021-03-15 CWE Content Team 4.4 updated Demonstrative_Examples, Description, Potential_Mitigations, Relationships
2023-04-27 CWE Content Team 4.11 updated Detection_Factors, Relationships
2023-06-29 CWE Content Team 4.12 updated Mapping_Notes
2025-04-03 CWE Content Team 4.17 updated Demonstrative_Examples
2025-12-11 CWE Content Team 4.19 updated Applicable_Platforms, Weakness_Ordinalities
cvelogic Threat Intelligence