CWE-1254Incorrect Comparison Logic Granularity

PUBLISHEDweakness record
released 2020-02-24 · last modified 2025-12-11

Metadata

CWE ID:
CWE-1254
摘要:
Base
结构:
Simple
状态:
Draft
发布日期:
2020-02-24
更新日期:
2025-12-11

名称

Incorrect Comparison Logic Granularity

描述

The product's comparison logic is performed over a series of steps rather than across the entire string in one operation. If there is a comparison logic failure on one of these steps, the operation may be vulnerable to a timing attack that can result in the interception of the process for nefarious purposes.

Comparison logic is used to compare a variety of objects including passwords, Message Authentication Codes (MACs), and responses to verification challenges. When comparison logic is implemented at a finer granularity (e.g., byte-by-byte comparison) and breaks in the case of a comparison failure, an attacker can exploit this implementation to identify when exactly the failure occurred. With multiple attempts, the attacker may be able to guesses the correct password/response to challenge and elevate their privileges.

常见后果

范围:
Confidentiality, Authorization
影响:
Bypass Protection Mechanism

相关 CWE