CWEweakness

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

Official page ↗
Alternate terms
Untrusted pointer offset
Abstraction
Base
Structure
Simple
Status
Incomplete
Languages
C, C++, Memory-Unsafe
CWE version
5.0

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.

Extended description

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.

Common consequences

• 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.) • 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].

Observed examples

• 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?

Related

Attack pattern · CAPEC (1)

  • CAPEC-129 Pointer Manipulation attack pattern

Observed example · CVE (17)

  • CVE-2010-2866 Integer signedness error in the DIRAPI module in Adobe Shockwave Player before 11.5.8.612 allows remote attackers to cause a denial of… vulnerability
  • CVE-2010-2867 DIRAPIX.dll in Adobe Shockwave Player before 11.5.8.612 does not properly handle a certain return value associated with the rcsL chunk in a… vulnerability
  • CVE-2010-2872 Adobe Shockwave Player before 11.5.8.612 does not properly validate an offset value in the pami RIFF chunk in a Director movie, which… vulnerability
  • CVE-2010-2873 Adobe Shockwave Player before 11.5.8.612 does not properly validate offset values in the rcsL RIFF chunks of (1) .DIR and (2) .DCR Director… vulnerability
  • CVE-2010-2878 DIRAPIX.dll in Adobe Shockwave Player before 11.5.8.612 does not properly validate a value associated with a buffer seek for a Director… vulnerability
  • CVE-2010-2160 Adobe Flash Player before 9.0.277.0 and 10.x before 10.1.53.64, and Adobe AIR before 2.0.2.12610, allows attackers to cause a denial of… vulnerability
  • CVE-2010-1281 iml32.dll in Adobe Shockwave Player before 11.5.7.609 does not validate a certain value from a file before using it in file-pointer… vulnerability
  • CVE-2009-3129 Microsoft Office Excel 2002 SP3, 2003 SP3, and 2007 SP1 and SP2; Office 2004 and 2008 for Mac; Open XML File Format Converter for Mac;… vulnerability
  • CVE-2009-2694 The msn_slplink_process_msg function in libpurple/protocols/msn/slplink.c in libpurple, as used in Pidgin (formerly Gaim) before 2.5.9 and… vulnerability
  • CVE-2009-2687 The exif_read_data function in the Exif module in PHP before 5.2.10 allows remote attackers to cause a denial of service (crash) via a… vulnerability
  • CVE-2009-0690 The Foxit JPEG2000/JBIG2 Decoder add-on before 2.0.2009.616 for Foxit Reader 3.0 before Build 1817 does not properly handle a negative… vulnerability
  • CVE-2009-1097 Multiple buffer overflows in Java SE Development Kit (JDK) and Java Runtime Environment (JRE) 6 Update 12 and earlier allow remote… vulnerability
  • CVE-2008-4114 srv.sys in the Server service in Microsoft Windows 2000 SP4, XP SP2 and SP3, Server 2003 SP1 and SP2, Vista Gold and SP1, and Server 2008… vulnerability
  • CVE-2008-1807 FreeType2 before 2.3.6 allow context-dependent attackers to execute arbitrary code via an invalid "number of axes" field in a Printer Font… vulnerability
  • CVE-2008-1686 Array index vulnerability in Speex 1.1.12 and earlier, as used in libfishsound 0.9.0 and earlier, including Illiminable DirectShow Filters… vulnerability
  • CVE-2007-5657 TIBCO SmartSockets RTserver 6.8.0 and earlier, RTworks before 4.0.4, and Enterprise Message Service (EMS) 4.0.0 through 4.4.1 allows remote… vulnerability
  • CVE-2007-2500 server/parser/sprite_definition.cpp in GNU Gnash (aka GNU Flash Player) 0.7.2 allows remote attackers to execute arbitrary code via a large… vulnerability

Can precede · CWE (2)

  • CWE-125 Out-of-bounds Read weakness
  • CWE-787 Out-of-bounds Write weakness

Child of · CWE (1)

  • CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer weakness

Referenced by CAPEC · weakness (1)

  • CAPEC-129 Pointer Manipulation attack pattern

Referenced by CVE · weakness (109)

  • CVE-2026-93862 An out-of-bounds read vulnerability in the FireCluster Sync processing allows an attacker positioned on the cluster interconnect, such as a… vulnerability
  • CVE-2026-107570 heap OOB write in convert_file_from_to() via a crafted Content-Type header allows attacker to OOB write when email is used as a template. vulnerability
  • CVE-2026-104944 TP-Link Tapo C500 v2.0 contains an out-of-bounds function-pointer dispatch in its TDP (TP-Link Device Protocol) daemon. vulnerability
  • CVE-2026-102757 An unprivileged, memory-protected ThreadX module can have the kernel read and write memory at addresses of its choosing, in privileged… vulnerability
  • CVE-2026-48977 OpenSlide is a C library for reading whole slide image files. vulnerability
  • CVE-2026-31912 libpcap BPF interpreter detects neither reaching the end of the filter program buffer due to lack of a return instruction nor executing a… vulnerability
  • CVE-2026-45199 Kernel software installed and running inside a Guest VM may post improper commands to the GPU Firmware to trigger a write of data outside… vulnerability
  • CVE-2026-72642 The native inference process that Elasticsearch uses to evaluate uploaded machine learning models accepts a model operation that computes a… vulnerability
  • CVE-2026-49746 Software installed and run as a non-privileged user may conduct improper GPU system calls to cause OOB read kernel memory access and in… vulnerability
  • CVE-2026-49744 Kernel software installed and running inside a Guest VM may post improper commands to the GPU Firmware to trigger a write of data outside… vulnerability
  • CVE-2026-49745 Kernel software installed and running inside a Guest VM may post improper commands to the GPU Firmware to trigger a write of data outside… vulnerability
  • CVE-2026-21734 A web page that contains unusual GPU shader code is loaded into the GPU compiler process and can trigger a write out-of-bounds write crash… vulnerability
  • CVE-2026-12290 Memory safety bug fixed in Thunderbird 152. vulnerability
  • CVE-2026-46244 In the Linux kernel, the following vulnerability has been resolved: netfilter: nft_inner: Fix IPv6 inner_thoff desync In… vulnerability
  • CVE-2026-34193 Kernel software installed and running inside a Guest/Host VM may post improper commands to the GPU Firmware to trigger a write of data… vulnerability
  • CVE-2026-28764 A heap-based buffer overflow vulnerability exists in the LXF element parsing functionality of MediaInfoLib (version(s): 26.01). vulnerability
  • CVE-2026-42946 A vulnerability exists in the ngx_http_scgi_module and ngx_http_uwsgi_module modules that may result in excessive memory allocation or an… vulnerability
  • CVE-2026-41907 uuid is for the creation of RFC9562 (formerly RFC4122) UUIDs. vulnerability
  • CVE-2025-33215 NVIDIA SNAP-4 Container contains a vulnerability in the VIRTIO-BLK component where a malicious guest VM may cause use of out-of-range… vulnerability
  • CVE-2026-4693 Incorrect boundary conditions in the Audio/Video: Playback component. vulnerability
  • CVE-2026-21732 A web page that contains unusual GPU shader code is loaded into the GPU compiler process and can trigger a write out-of-bounds write crash… vulnerability
  • CVE-2026-32829 lz4_flex is a pure Rust implementation of LZ4 compression/decompression. vulnerability
  • CVE-2026-20022 A vulnerability in the OSPF protocol of Cisco Secure Firewall ASA Software and Cisco Secure FTD Software could allow an unauthenticated,… vulnerability
  • CVE-2025-54152 A use of out-of-range pointer offset vulnerability has been reported to affect Qsync Central. vulnerability
  • CVE-2026-23764 VB-Audio Voicemeeter, Voicemeeter Banana, and Voicemeeter Potato (versions ending in 1.1.1.9, 2.1.1.9, and 3.1.1.9 and earlier,… vulnerability
  • CVE-2026-21487 iccDEV provides a set of libraries and tools for working with ICC color management profiles. vulnerability
  • CVE-2017-20211 UCanCode E-XD++ Visualization Enterprise Suite contains an untrusted pointer dereference vulnerability via the TKDRAWCAD.TKDrawCADCtrl.1… vulnerability
  • CVE-2025-11232 To trigger the issue, three configuration parameters must have specific settings: "hostname-char-set" must be left at the default setting,… vulnerability
  • CVE-2025-27059 Memory corruption while performing SCM call. vulnerability
  • CVE-2025-47349 Memory corruption while processing an escape call. vulnerability
Show all 109 ›

Referenced by CWE · can precede (1)

  • CWE-129 Improper Validation of Array Index weakness