CWE-187: Partial String Comparison

What is CWE-187?

CWE-187 is Partial String Comparison. The flaw arises when the product performs a string comparison that only examines a portion of the string before determining whether there is a match. The database currently holds 15 vulnerabilities mapped to CWE-187 and none of them are in the CISA Known Exploited Vulnerabilities catalog.

OWASP Top 10 Rank-
Related CVES (365 days)15
AbstractionVariant
Likelihood of exploit-

Vulnerabilities mapped to CWE-187

15 vulnerabilities1400% increase year over year

No data

No vulnerability data in CISA KEV for CWE-187

Official definition

ByMitre CWE

The product performs a string comparison that only examines a portion of the string before determining whether there is a match.

Characteristics

Modes of introduction

  • Implementation

Common consequences

ImpactScopeExplanation
Alter Execution Logic, Bypass Protection MechanismIntegrity, Access ControlAn attacker might succeed in authentication by providing a small password that matches the associated portion of the larger, correct password.

Risk mitigations

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

Representative vulnerabilities

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.