---
title: "CWE-1271: Uninitialized Value on Reset for Registers Holding Security Settings"
url: https://radicalnotion.ai/cwe/cwe-1271
type: cwe
description: "Security-critical logic is not set to a known value on reset."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-1271: Uninitialized Value on Reset for Registers Holding Security Settings

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

## Description

Security-critical logic is not set to a known value on reset.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Access Control, Authentication, Authorization | Varies by Context | When the device is first brought out of reset, the state of registers will be indeterminate if they have not been initialized by the logic. Before the registers are initialized, there will be a window during which the device is in an insecure state and may be vulnerable to attack. |

## Potential mitigations

### Implementation

Design checks should be performed to identify any uninitialized flip-flops used for security-critical functions.

### Architecture and Design

All registers holding security-critical information should be set to a specific value on reset.

## Demonstrative examples

### Example 1

Shown below is a positive clock edge triggered flip-flop used to implement a lock bit for test and debug interface. When the circuit is first brought out of reset, the state of the flip-flop will be unknown until the enable input and D-input signals update the flip-flop state. In this example, an attacker can reset the device until the test and debug interface is unlocked and access the test interface until the lock signal is driven to a known state by the logic.

Bad code:

```verilog
always @(posedge clk) begin
    if (en) lock_jtag <= d;
end
```

Good code:

```verilog
always @(posedge clk) begin
    if (~reset) lock_jtag <= 0;
    else if (en) lock_jtag <= d;
end
```

The flip-flop can be set to a known value (0 or 1) on reset, but requires that the logic explicitly update the output of the flip-flop if the reset signal is active.

## Related attack patterns (CAPEC)

- [CAPEC-74](https://radicalnotion.ai/capec/capec-74): Manipulating State

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-909](https://radicalnotion.ai/cwe/cwe-909) | Missing Initialization of Resource |
| Peer | [CWE-1304](https://radicalnotion.ai/cwe/cwe-1304) | Improperly Preserved Integrity of Hardware Configuration State During a Power Save/Restore Operation |

## Frequently asked questions

### What is CWE-1271?

Security-critical logic is not set to a known value on reset.

### How do you prevent CWE-1271?

Design checks should be performed to identify any uninitialized flip-flops used for security-critical functions.

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

Exploiting CWE-1271 can lead to: Varies by Context.

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

---

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