---
title: "CWE-208: Observable Timing Discrepancy"
url: https://radicalnotion.ai/cwe/cwe-208
type: cwe
description: "Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-208: Observable Timing Discrepancy

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 216
- **Of those, in CISA KEV:** 0
- **New in 2026:** 125
- **CWE catalog version:** 4.21

## Description

Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic. |
| Implementation | - |
| Operation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Access Control | Read Application Data, Bypass Protection Mechanism | In security-relevant contexts, even small variations in timing can be exploited by attackers to indirectly infer certain details about the product's internal operations. For example, in some cryptographic algorithms, attackers can use timing differences to infer certain properties about a private key, making the key easier to guess. Timing discrepancies effectively form a timing side channel. |

## Demonstrative examples

### Example 1

Consider an example hardware module that checks a user-provided password to grant access to a user. The user-provided password is compared against a golden value in a byte-by-byte manner.

Bad code:

```verilog
always_comb @ (posedge clk)

begin
    assign check_pass[3:0] = 4'b0;
    for (i = 0; i < 4; i++) begin
        if (entered_pass[(i*8 - 1) : i] eq golden_pass([i*8 - 1) : i])
            assign check_pass[i] = 1;
            continue;
        else
            assign check_pass[i] = 0;
            break;
        end
    assign grant_access = (check_pass == 4'b1111) ? 1'b1: 1'b0;
end
```

Good code:

```verilog
always_comb @ (posedge clk)
begin
    assign check_pass[3:0] = 4'b0;
    for (i = 0; i < 4; i++) begin
        if (entered_pass[(i*8 - 1) : i] eq golden_pass([i*8 -1) : i])
            assign check_pass[i] = 1;
            continue;
        else
            assign check_pass[i] = 0;
            continue;
        end
    assign grant_access = (check_pass == 4'b1111) ? 1'b1: 1'b0;
end
```

### Example 2

In this example, the attacker observes how long an authentication takes when the user types in the correct password.

Bad code:

```python
def validate_password(actual_pw, typed_pw):
    if len(actual_pw) <> len(typed_pw):
        return 0

    for i in len(actual_pw):
        if actual_pw[i] <> typed_pw[i]:
            return 0

    return 1
```

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2019-10071 | Java-oriented framework compares HMAC signatures using String.equals() instead of a constant-time algorithm, causing timing discrepancies |
| CVE-2019-10482 | Smartphone OS uses comparison functions that are not in constant time, allowing side channels |
| CVE-2014-0984 | Password-checking function in router terminates validation of a password entry when it encounters the first incorrect character, which allows remote attackers to obtain passwords via a brute-force attack that relies on timing differences in responses to incorrect password guesses, aka a timing side-channel attack. |
| CVE-2003-0078 | SSL implementation does not perform a MAC computation if an incorrect block cipher padding is used, which causes an information leak (timing discrepancy) that may make it easier to launch cryptographic attacks that rely on distinguishing between padding and MAC verification errors, possibly leading to extraction of the original plaintext, aka the "Vaudenay timing attack." |
| CVE-2000-1117 | Virtual machine allows malicious web site operators to determine the existence of files on the client by measuring delays in the execution of the getSystemResource method. |
| CVE-2003-0637 | Product uses a shorter timeout for a non-existent user than a valid user, which makes it easier for remote attackers to guess usernames and conduct brute force password guessing. |
| CVE-2003-0190 | Product immediately sends an error message when a user does not exist, which allows remote attackers to determine valid usernames via a timing attack. |
| CVE-2004-1602 | FTP server responds in a different amount of time when a given username exists, which allows remote attackers to identify valid usernames by timing the server response. |
| CVE-2005-0918 | Browser allows remote attackers to determine the existence of arbitrary files by setting the src property to the target filename and using Javascript to determine if the web page immediately stops loading, which indicates whether the file exists or not. |

## Real CVEs with this weakness (sample of 12 of 216)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-43384 | net/tcp-ao: Fix MAC comparison to be constant-time | critical | 9.8 | - | No | 2026-05-08 |
| CVE-2023-41313 | Apache Doris: Timing Attack weakness | critical | 9.8 | - | No | 2024-03-12 |
| CVE-2021-21575 | - | critical | 9.8 | - | No | 2024-02-02 |
| CVE-2021-43298 | Improper Restriction of Excessive Authentication Attempts in Hitachi Energy MSM | critical | 9.8 | - | No | 2022-01-25 |
| CVE-2026-43383 | net/tcp-md5: Fix MAC comparison to be constant-time | critical | 9.4 | - | No | 2026-05-08 |
| CVE-2026-63132 | OpenBao's Recovery Mode Vulnerable To Token Leakage via Timing Attack | critical | 9.2 | - | No | 2026-09-23 |
| CVE-2026-41588 | RELATE: Timing Attack Vulnerability in course/auth.py — check\_sign\_in\_key() | critical | 9.0 | - | No | 2026-05-08 |
| CVE-2026-23519 | RustCrypto cmov: thumbv6m-none-eabi compiler emits non-constant time assembly when using cmovnz | high | 8.9 | - | No | 2026-01-15 |
| CVE-2026-72700 | Grav before 3.9.1 Timing Attack via Non-Constant-Time Token Comparison | high | 8.7 | - | No | 2026-08-25 |
| CVE-2024-47178 | basic-auth-connect's callback uses time unsafe string comparison | high | 8.7 | - | No | 2024-09-30 |
| CVE-2024-42512 | Observable Timing Discrepancy in Siemens OPC UA | high | 8.6 | - | No | 2025-02-10 |
| CVE-2025-53940 | Quiet uses insecure, inconsistent verification on local backend token | high | 8.5 | - | No | 2025-07-24 |

## Related attack patterns (CAPEC)

- [CAPEC-462](https://radicalnotion.ai/capec/capec-462): Cross-Domain Search Timing
- [CAPEC-541](https://radicalnotion.ai/capec/capec-541): Application Fingerprinting
- [CAPEC-580](https://radicalnotion.ai/capec/capec-580): System Footprinting

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-203](https://radicalnotion.ai/cwe/cwe-203) | Observable Discrepancy |
| Child | [CWE-1254](https://radicalnotion.ai/cwe/cwe-1254) | Incorrect Comparison Logic Granularity |
| Can precede | [CWE-327](https://radicalnotion.ai/cwe/cwe-327) | Use of a Broken or Risky Cryptographic Algorithm |
| Can precede | [CWE-385](https://radicalnotion.ai/cwe/cwe-385) | Covert Timing Channel |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | Timing discrepancy infoleak | - | - |

## Frequently asked questions

### What is CWE-208?

Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.

### What CVEs are caused by CWE-208?

216 recorded CVEs are attributed to CWE-208, including CVE-2026-43384, CVE-2023-41313 and CVE-2021-21575.

### What are the consequences of CWE-208?

Exploiting CWE-208 can lead to: Read Application Data, Bypass Protection Mechanism.

### Is CWE-208 actively exploited?

216 recorded CVEs are caused by CWE-208; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/208.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-208). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
