---
title: "CWE-1246: Improper Write Handling in Limited-write Non-Volatile Memories"
url: https://radicalnotion.ai/cwe/cwe-1246
type: cwe
description: "The product does not implement or incorrectly implements wear leveling operations in limited-write non-volatile memories."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-1246: Improper Write Handling in Limited-write Non-Volatile Memories

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

## Description

The product does not implement or incorrectly implements wear leveling operations in limited-write non-volatile memories.

## Background

Non-volatile memories such as NAND Flash, EEPROM, etc. have individually erasable segments, each of which can be put through a limited number of program/erase or write cycles. For example, the device can only endure a limited number of writes, after which the device becomes unreliable. In order to wear out the cells in a uniform manner, non-volatile memory and storage products based on the above-mentioned technologies implement a technique called wear leveling. Once a set threshold is reached, wear leveling maps writes of a logical block to a different physical block. This prevents a single physical block from prematurely failing due to a high concentration of writes.

## Modes of introduction

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

## Applicable platforms

**Technologies:** System on Chip (Undetermined), Memory Hardware (Undetermined), Storage Hardware (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Availability | DoS: Instability | If wear leveling is improperly implemented, attackers may be able to programmatically cause the storage to become unreliable within a much shorter time than would normally be expected. |

## Potential mitigations

### Architecture and Design, Implementation, Testing

Include secure wear leveling algorithms and ensure they may not be bypassed.

Effectiveness: High

## Demonstrative examples

### Example 1

An attacker can render a memory line unusable by repeatedly causing a write to the memory line.

Attack code:

```c++
// Do aligned alloc of (W+1) arrays each of size S
while(1) {
    for (ii = 0; ii < W + 1; ii++)
        array[ii].element[0]++;
}
```

Good code:

```other
Wear leveling must be used to even out writes to the device.
```

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2024-36432 | - | high | 7.5 | - | No | 2024-07-15 |
| CVE-2023-32229 | - | medium | 6.5 | - | No | 2023-06-15 |

## Related attack patterns (CAPEC)

- [CAPEC-212](https://radicalnotion.ai/capec/capec-212): Functionality Misuse

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-400](https://radicalnotion.ai/cwe/cwe-400) | Uncontrolled Resource Consumption |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| ISA/IEC 62443 | Req SD-4 | Part 4-1 | - |
| ISA/IEC 62443 | Req SI-1 | Part 4-1 | - |
| ISA/IEC 62443 | Req SVV-3 | Part 4-1 | - |

## Frequently asked questions

### What is CWE-1246?

The product does not implement or incorrectly implements wear leveling operations in limited-write non-volatile memories.

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

2 recorded CVEs are attributed to CWE-1246, including CVE-2024-36432 and CVE-2023-32229.

### How do you prevent CWE-1246?

Include secure wear leveling algorithms and ensure they may not be bypassed.

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

Exploiting CWE-1246 can lead to: DoS: Instability.

### Is CWE-1246 actively exploited?

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

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

---

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