---
title: "CWE-823: Use of Out-of-range Pointer Offset"
url: https://radicalnotion.ai/cwe/cwe-823
type: cwe
description: "The product performs pointer arithmetic on a valid pointer, but it uses an offset that can point outside of the intended range of valid memory locations for the resulting pointer."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-823: Use of Out-of-range Pointer Offset

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

## Description

The product performs pointer arithmetic on a valid pointer, but it uses an offset that can point outside of the intended range of valid memory locations for the resulting pointer.

The offset might be out-of-range if it comes from an untrusted source, is the result of an incorrect calculation, or occurs because of another error.

If an attacker can control or influence the offset so that it points outside of the intended boundaries of the structure, then the attacker may be able to read or write to memory locations that are used elsewhere in the product. As a result, the attack might change the state of the product as accessed through program variables, cause a crash or instable behavior, and possibly lead to code execution.

## Background

While a pointer can contain a reference to any arbitrary memory location, a program typically only intends to use the pointer to access limited portions of memory, such as contiguous memory used to access an individual array. Programs may use offsets in order to access fields or sub-elements stored within structured data.

## Alternate terms

- **Untrusted pointer offset:** This term is narrower than the concept of "out-of-range" offset, since the offset might be the result of a calculation or other error that does not depend on any externally-supplied values.

## Modes of introduction

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

## Applicable platforms

**Languages:** Memory-Unsafe (Undetermined), C (Undetermined), C++ (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality | Read Memory | If the untrusted pointer is used in a read operation, an attacker might be able to read sensitive portions of memory. |
| Availability | DoS: Crash, Exit, or Restart | If the untrusted pointer references a memory location that is not accessible to the program, or points to a location that is "malformed" or larger than expected by a read or write operation, the application may terminate unexpectedly. |
| Integrity, Confidentiality, Availability | Execute Unauthorized Code or Commands, Modify Memory | If the untrusted pointer is used in a function call, or points to unexpected data in a write operation, then code execution may be possible. |

## Detection methods

### Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Effectiveness: High

### Automated Dynamic Analysis

Use tools that are integrated during compilation to insert runtime error-checking mechanisms related to memory safety errors, such as AddressSanitizer (ASan) for C/C++ \[REF-1518\].

Effectiveness: Moderate. Crafted inputs are necessary to reach the code containing the error, such as generated by fuzzers. Also, these tools may reduce performance, and they only report the error condition - not the original mistake that led to the error.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2010-2160 | Invalid offset in undocumented opcode leads to memory corruption. |
| CVE-2010-1281 | Multimedia player uses untrusted value from a file when using file-pointer calculations. |
| CVE-2009-3129 | Spreadsheet program processes a record with an invalid size field, which is later used as an offset. |
| CVE-2009-2694 | Instant messaging library does not validate an offset value specified in a packet. |
| CVE-2009-2687 | Language interpreter does not properly handle invalid offsets in JPEG image, leading to out-of-bounds memory access and crash. |
| CVE-2009-0690 | negative offset value leads to out-of-bounds read |
| CVE-2008-4114 | untrusted offset in kernel |
| CVE-2010-2873 | "blind trust" of an offset value while writing heap memory allows corruption of function pointer,leading to code execution |
| CVE-2010-2866 | negative value (signed) causes pointer miscalculation |
| CVE-2010-2872 | signed values cause incorrect pointer calculation |
| CVE-2007-5657 | values used as pointer offsets |
| CVE-2010-2867 | a return value from a function is sign-extended if the value is signed, then used as an offset for pointer arithmetic |
| CVE-2009-1097 | portions of a GIF image used as offsets, causing corruption of an object pointer. |
| CVE-2008-1807 | invalid numeric field leads to a free of arbitrary memory locations, then code execution. |
| CVE-2007-2500 | large number of elements leads to a free of an arbitrary address |
| CVE-2008-1686 | array index issue (CWE-129) with negative offset, used to dereference a function pointer |
| CVE-2010-2878 | "buffer seek" value - basically an offset? |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2023-33106 | Use of Out-of-range Pointer Offset in Graphics | high | 8.6 | - | Yes | 2023-12-05 |
| CVE-2026-74912 | GPU DDK - Fix for CVE-2026-49746 prevents the mapping of graphics buffers \> 4GB | critical | 9.8 | - | No | 2026-10-30 |
| CVE-2024-42383 | Use of Out-of-range Pointer Offset in Mongoose Web Server library | critical | 9.8 | - | No | 2024-11-18 |
| CVE-2023-43553 | Use of Out-of-range Pointer Offset in WLAN HOST | critical | 9.8 | - | No | 2024-03-04 |
| CVE-2023-43534 | Use of Out-of-range Pointer Offset in WLAN HOST | critical | 9.8 | - | No | 2024-02-06 |
| CVE-2023-22388 | Use of Out-of-range Pointer Offset in Multi-mode Call Processor | critical | 9.8 | - | No | 2023-11-07 |
| CVE-2023-24855 | Use of Out-of-range Pointer Offset in Modem | critical | 9.8 | - | No | 2023-10-03 |
| CVE-2026-21732 | GPU DDK - libusc OOB write at ConvertSwitchToArrayLookupBP during WebGPU shader compilation | critical | 9.6 | - | No | 2026-03-20 |
| CVE-2020-8904 | Arbitrary trusted memory overwrite vulnerability in Asylo | critical | 9.6 | - | No | 2020-08-12 |
| CVE-2026-74573 | iommu/arm-smmu-v3-iommufd: Require exactly one Stream ID for a vDEVICE | critical | 9.3 | - | No | 2026-08-15 |
| CVE-2026-74915 | GPU DDK - OOB write in UntwiddlePOTSquare64bpp | high | 8.8 | - | No | 2026-10-30 |
| CVE-2026-72295 | LoongArch: KVM: Validate irqchip index in irqfd routing | high | 8.8 | - | No | 2026-08-15 |

## Related attack patterns (CAPEC)

- [CAPEC-129](https://radicalnotion.ai/capec/capec-129): Pointer Manipulation

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-119](https://radicalnotion.ai/cwe/cwe-119) | Improper Restriction of Operations within the Bounds of a Memory Buffer |
| Can precede | [CWE-125](https://radicalnotion.ai/cwe/cwe-125) | Out-of-bounds Read |
| Can precede | [CWE-787](https://radicalnotion.ai/cwe/cwe-787) | Out-of-bounds Write |
| Related | [CWE-129](https://radicalnotion.ai/cwe/cwe-129) | Improper Validation of Array Index |

## Frequently asked questions

### What is CWE-823?

The product performs pointer arithmetic on a valid pointer, but it uses an offset that can point outside of the intended range of valid memory locations for the resulting pointer.

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

143 recorded CVEs are attributed to CWE-823, including CVE-2023-33106, CVE-2026-74912 and CVE-2024-42383. 1 is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### How is CWE-823 detected?

Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

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

Exploiting CWE-823 can lead to: Read Memory, DoS: Crash, Exit, or Restart, Execute Unauthorized Code or Commands, Modify Memory.

### Is CWE-823 actively exploited?

Yes. 1 CWE-823 vulnerability is in CISA's KEV catalog of actively exploited flaws, out of 143 recorded CVEs.

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

---

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