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

8 results · Feed

  • High 7.5

    A logic issue was addressed with improved checks. This issue is fixed in iOS 18.7.9 and iPadOS 18.7.9, macOS Sequoia 15…

  • High 8.8

    CI4MS: Account Deactivation Module Full Persistent Unauthorized Access for All‑Roles via Improper Session Invalidation (Logic Flaw)

    CI4MS is a CodeIgniter 4-based CMS skeleton that delivers a production-ready, modular architecture with RBAC authorization and theme support. Prior to version 0.31.0.0, the application fails to immediately revoke active user sessions when an account is deacti…

  • High 8.8

    CI4MS: Account Deletion Module Full Persistent Unauthorized Access for All‑Roles via Improper Session Invalidation (Logic Flaw)

    CI4MS is a CodeIgniter 4-based CMS skeleton that delivers a production-ready, modular architecture with RBAC authorization and theme support. Prior to version 0.31.0.0, the application fails to immediately revoke active user sessions when an account is delete…

  • Medium 4.8

    OpenClaw's sandbox config hash sorted primitive arrays and suppressed needed container recreation

    OpenClaw is a personal AI assistant. Prior to version 2026.2.15, `normalizeForHash` in `src/agents/sandbox/config-hash.ts` recursively sorted arrays that contained only primitive values. This made order-sensitive sandbox configuration arrays hash to the same …

  • High 7.5

    Plack::Middleware::Session versions before 0.17 for Perl may be vulnerable to HMAC comparison timing attacks

    Plack-Middleware-Session versions before 0.17 may be vulnerable to HMAC comparison timing attacks

  • Medium 6.5

    GoCD API authentication of user access tokens subject to timing attack during comparison

    GoCD is a continuous delivery server. GoCD helps you automate and streamline the build-test-release cycle for continuous delivery of your product. GoCD versions from 19.2.0 to 19.10.0 (inclusive) are subject to a timing attack in validation of access tokens d…

  • 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.