CWE-187
Partial String Comparison
Description
The product performs a string comparison that only examines a portion of the string before determining whether there is a match.
Top Monitored CVEs
Consequences
Integrity, Access Control
—
Alter Execution Logic, Bypass Protection Mechanism
An attacker might succeed in authentication by providing a small password that matches the associated portion of the larger, correct password.
Mitigations
Phase: Testing
Thoroughly test the comparison scheme before deploying code into production. Perform positive testing as well as negative testing.