Skip to content
OpenAdvisories

Weakness (CWE)

CWE-1254: Incorrect Comparison Logic Granularity

Base Draft

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.

More detail

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.

How to prevent it (1 mitigation)
  1. Implementation

    The hardware designer should ensure that comparison logic is implemented so as to compare in one operation instead in smaller chunks.

Source: MITRE CWE-1254

2 results · Clear filters · Feed

  • Critical 9.8

    Incorrect Handling of Non-Boolean Comparisons During Minification in uglify-js

    The uglify-js package before 2.4.24 for Node.js does not properly account for non-boolean values when rewriting boolean expressions, which might allow attackers to bypass security mechanisms or possibly have unspecified other impact by leveraging improperly r…

  • Critical 9.1

    Doorkeeper is vulnerable to replay attacks

    The Doorkeeper gem before 4.2.0 for Ruby might allow remote attackers to conduct replay attacks or revoke arbitrary tokens by leveraging failure to implement the OAuth 2.0 Token Revocation specification.