---
title: "CWE-1258: Exposure of Sensitive System Information Due to Uncleared Debug Information"
url: https://radicalnotion.ai/cwe/cwe-1258
type: cwe
description: "The hardware product enters debug mode but does not fully clear security-sensitive values, such as keys and intermediate values in cryptographic operations."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-1258: Exposure of Sensitive System Information Due to Uncleared Debug Information

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

## Description

The hardware product enters debug mode but does not fully clear security-sensitive values, such as keys and intermediate values in cryptographic operations.

Security sensitive values, keys, intermediate steps of cryptographic operations, etc. are stored in temporary registers in the hardware.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | - |
| Implementation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality | Read Memory | Sensitive data could be accessed by a debugger, allowing sensitive information to be accessible by untrusted parties. |
| Access Control | Bypass Protection Mechanism | - |

## Potential mitigations

### Architecture and Design

Whenever debug mode is enabled, all registers containing sensitive assets must be cleared.

## Demonstrative examples

### Example 1

A cryptographic core in a System-On-a-Chip (SoC) is used for cryptographic acceleration and implements several cryptographic operations (e.g., computation of AES encryption and decryption, SHA-256, HMAC, etc.). The keys for these operations or the intermediate values are stored in registers internal to the cryptographic core. These internal registers are in the Memory Mapped Input Output (MMIO) space and are blocked from access by software and other untrusted agents on the SoC. These registers are accessible through the debug and test interface.

### Example 2

The following code example is extracted from the AES wrapper module, aes1\_wrapper, of the Hack@DAC'21 buggy OpenPiton System-on-Chip (SoC). Within this wrapper module are four memory-mapped registers: core\_key, core\_key0, core\_key1, and core\_key2. Core\_key0, core\_key1, and core\_key2 hold encryption/decryption keys. The core\_key register selects a key and sends it to the underlying AES module to execute encryption/decryption operations.

Debug mode in processors and SoCs facilitates design debugging by granting access to internal signal/register values, including physical pin values of peripherals/core, fabric bus data transactions, and inter-peripheral registers. Debug mode allows users to gather detailed, low-level information about the design to diagnose potential issues. While debug mode is beneficial for diagnosing processors or SoCs, it also introduces a new attack surface for potential attackers. For instance, if an attacker gains access to debug mode, they could potentially read any content transmitted through the fabric bus or access encryption/decryption keys stored in cryptographic peripherals.

Therefore, it is crucial to clear the contents of secret registers upon entering debug mode. In the provided example of flawed code below, when debug\_mode\_i is activated, the register core\_key0 is set to zero to prevent AES key leakage during debugging. However, this protective measure is not applied to the core\_key1 register \[REF-1435\], leaving its contents uncleared during debug mode. This oversight enables a debugger to access sensitive information. Failing to clear sensitive data during debug mode may lead to unauthorized access to secret keys and compromise system security.

Bad code:

```systemverilog
module aes1_wrapper #(
...
    assign core_key0 = debug_mode_i ? 'b0 : {
        key_reg0[7],
        key_reg0[6],
        key_reg0[5],
        key_reg0[4],
        key_reg0[3],
        key_reg0[2],
        key_reg0[1],
        key_reg0[0]};
    assign core_key1 = {
        key_reg1[7],
        key_reg1[6],
        key_reg1[5],
        key_reg1[4],
        key_reg1[3],
        key_reg1[2],
        key_reg1[1],
        key_reg1[0]};
...
endmodule
```

Good code:

```systemverilog
module aes1_wrapper #(
...
    assign core_key0 = debug_mode_i ? 'b0 : {
        key_reg0[7],
        key_reg0[6],
        key_reg0[5],
        key_reg0[4],
        key_reg0[3],
        key_reg0[2],
        key_reg0[1],
        key_reg0[0]};
    assign core_key1 = debug_mode_i ? 'b0 : {
        key_reg1[7],
        key_reg1[6],
        key_reg1[5],
        key_reg1[4],
        key_reg1[3],
        key_reg1[2],
        key_reg1[1],
        key_reg1[0]};
...
endmodule
```

To address the issue, it is essential to ensure that the register is cleared and zeroized after activating debug mode on the SoC. In the correct implementation illustrated in the good code below, core\_keyx registers are set to zero when debug mode is activated \[REF-1436\].

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2021-33080 | Uncleared debug information in memory accelerator for SSD product exposes sensitive system information |
| CVE-2022-31162 | Rust library leaks Oauth client details in application debug logs |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2024-36912 | Drivers: hv: vmbus: Track decrypted status in vmbus\_gpadl | critical | 9.6 | - | No | 2024-05-30 |
| CVE-2024-36913 | Drivers: hv: vmbus: Leak pages if set\_memory\_encrypted() fails | critical | 9.3 | - | No | 2024-05-30 |
| CVE-2026-66432 | WordPress WPJAM Basic plugin \<= 7.0.2.1 - Sensitive Data Exposure vulnerability | high | 7.5 | - | No | 2026-08-13 |
| CVE-2026-52696 | WordPress JetBlog plugin \<= 2.4.8 - Sensitive Data Exposure vulnerability | high | 7.5 | - | No | 2026-06-17 |
| CVE-2022-39292 | Exposure of sensitive Slack webhook URLs in debug logs and traces | high | 7.5 | - | No | 2022-10-10 |
| CVE-2022-31162 | Slack Morphism for Rust before 0.41.0 can accidentally leak Slack OAuth client information in application debug logs | high | 7.5 | - | No | 2022-07-21 |
| CVE-2023-48308 | Calendar app returns full stacktrace when an error happens while editing appointment | medium | 6.5 | - | No | 2023-12-21 |
| CVE-2022-43666 | - | medium | 5.5 | - | No | 2023-11-14 |
| CVE-2025-32257 | WordPress 1 Click WordPress Migration plugin \<= 2.5.7 - Sensitive Data Exposure vulnerability | medium | 5.3 | - | No | 2025-04-04 |
| CVE-2026-65127 | - | medium | 4.9 | - | No | 2026-09-22 |
| CVE-2026-26948 | - | medium | 4.9 | - | No | 2026-03-18 |
| CVE-2025-26482 | - | medium | 4.9 | - | No | 2025-09-25 |

## Related attack patterns (CAPEC)

- [CAPEC-150](https://radicalnotion.ai/capec/capec-150): Collect Data from Common Resource Locations
- [CAPEC-204](https://radicalnotion.ai/capec/capec-204): Lifting Sensitive Data Embedded in Cache
- [CAPEC-37](https://radicalnotion.ai/capec/capec-37): Retrieve Embedded Sensitive Data
- [CAPEC-545](https://radicalnotion.ai/capec/capec-545): Pull Data from System Resources

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-1272](https://radicalnotion.ai/cwe/cwe-1272) | Sensitive Information Uncleared Before Debug/Power State Transition |
| Peer | [CWE-1431](https://radicalnotion.ai/cwe/cwe-1431) | Driving Intermediate Cryptographic State/Results to Hardware Module Outputs |
| Can also be | [CWE-1239](https://radicalnotion.ai/cwe/cwe-1239) | Improper Zeroization of Hardware Register |

## Frequently asked questions

### What is CWE-1258?

The hardware product enters debug mode but does not fully clear security-sensitive values, such as keys and intermediate values in cryptographic operations.

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

16 recorded CVEs are attributed to CWE-1258, including CVE-2024-36912, CVE-2024-36913 and CVE-2026-66432.

### How do you prevent CWE-1258?

Whenever debug mode is enabled, all registers containing sensitive assets must be cleared.

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

Exploiting CWE-1258 can lead to: Read Memory, Bypass Protection Mechanism.

### Is CWE-1258 actively exploited?

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

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

---

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