CWEweakness

CWE-123 Write-what-where Condition

High Official page ↗
Abstraction
Base
Structure
Simple
Status
Draft
Likelihood of exploit
High
Languages
C, C++, Memory-Unsafe
CWE version
5.0

Description

Any condition where the attacker has the ability to write an arbitrary value to an arbitrary location, often as the result of a buffer overflow.

Common consequences

• Integrity, Confidentiality, Availability, Access Control: Modify Memory, Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity, DoS: Crash, Exit, or Restart, Bypass Protection Mechanism — Clearly, write-what-where conditions can be used to write data to areas of memory outside the scope of a policy. Also, they almost invariably can be used to execute arbitrary code, which is usually outside the scope of a program's implicit security policy. If the attacker can overwrite a pointer's worth of memory (usually 32 or 64 bits), they can redirect a function pointer to their own malicious code. Even when the attacker can only modify a single byte arbitrary code execution can be possible. Sometimes this is because the same problem can be exploited repeatedly to the same effect. Other times it is because the attacker can overwrite security-critical application-specific data -- such as a flag indicating whether the user is an administrator. • Integrity, Availability: DoS: Crash, Exit, or Restart, Modify Memory — Many memory accesses can lead to program termination, such as when writing to addresses that are invalid for the current process. • Access Control, Other: Bypass Protection Mechanism, Other — When the consequence is arbitrary code execution, this can often be used to subvert any other security service.

Potential mitigations

• [Architecture and Design] Use a language that provides appropriate memory abstractions. • [Operation] Use OS-level preventative functionality integrated after the fact. Not a complete solution.

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-2019-19911: Chain: Python library does not limit the resources used to process images that specify a very large number of bands (CWE-1284), leading to excessive memory consumption (CWE-789) or an integer overflow (CWE-190). • CVE-2022-0545: Chain: 3D renderer has an integer overflow (CWE-190) leading to write-what-where condition (CWE-123) using a crafted image.

Related

Observed example · CVE (2)

  • CVE-2022-0545 An integer overflow in the processing of loaded 2D images leads to a write-what-where vulnerability and an out-of-bounds read… vulnerability
  • CVE-2019-19911 There is a DoS vulnerability in Pillow before 6.2.2 caused by FpxImagePlugin.py calling the range function on an unvalidated 32-bit integer… vulnerability

Child of · CWE (2)

  • CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer weakness
  • CWE-787 Out-of-bounds Write weakness

Referenced by CVE · weakness (64)

  • CVE-2026-92372 An out-of-bounds write vulnerability in the screen-image decoder of TeamViewer Full Client for Linux and macOS prior to version 15.83… vulnerability
  • CVE-2026-25262 Memory corruption while processing a crafted ELF file in the Primary Bootloader. vulnerability
  • CVE-2026-94128 A security vulnerability has been detected in BioStar VIVID LED DJ 4.0.2411.1500. vulnerability
  • CVE-2026-94129 A vulnerability was detected in BioStar VALKYRIE AURORA 2.10.2411.0800. vulnerability
  • CVE-2026-94142 A security vulnerability has been detected in BioStar Temperature Monitor Utility 1.2.1806.2200. vulnerability
  • CVE-2026-94146 A vulnerability was found in BioStar BIOS Update Utility 1.9.7.3. vulnerability
  • CVE-2026-48977 OpenSlide is a C library for reading whole slide image files. vulnerability
  • CVE-2026-81579 In WibuKey for Windows before version 6.71, an untrusted pointer dereference in the WibuKey2_64.sys kernel driver for 64-bit Windows allows… vulnerability
  • CVE-2026-20469 In trusted_mem, there is a possible escalation of privilege due to improper input validation. vulnerability
  • CVE-2026-47473 NVIDIA TensorRT-LLM contains a vulnerability where an attacker could cause a write-what-where condition. vulnerability
  • CVE-2026-45257 The KTLS receive path decrypted each record in place, assuming that the mbufs holding received data were anonymous and safe to modify. vulnerability
  • CVE-2026-30121 remotion-dev remotion v4.0.409 was discovered to contain an arbitrary file write vulnerability. vulnerability
  • CVE-2026-46323 In the Linux kernel, the following vulnerability has been resolved: net: gro: don't merge zcopy skbs skb_gro_receive() can currently copy… vulnerability
  • CVE-2026-46300 In the Linux kernel, the following vulnerability has been resolved: net: skbuff: preserve shared-frag marker during coalescing… vulnerability
  • CVE-2026-43500 In the Linux kernel, the following vulnerability has been resolved: rxrpc: Also unshare DATA/RESPONSE packets when paged frags are present… vulnerability
  • CVE-2026-43284 In the Linux kernel, the following vulnerability has been resolved: xfrm: esp: avoid in-place decrypt on shared skb frags MSG_SPLICE_PAGES… vulnerability
  • CVE-2026-41952 Local privilege escalation due to improper input validation. vulnerability
  • CVE-2025-14857 An improper access control vulnerability exists in Semtech LoRa LR11xxx transceivers running early versions of firmware where the memory… vulnerability
  • CVE-2025-69809 A write-what-where condition in p2r3 Bareiron commit 8e4d40 allows unauthenticated attackers to write arbitrary values to memory, enabling… vulnerability
  • CVE-2026-25634 iccDEV provides a set of libraries and tools that allow for the interaction, manipulation, and application of ICC color management profiles. vulnerability
  • CVE-2025-29943 Write what were condition within AMD CPUs may allow an admin-privileged attacker to modify the configuration of the CPU pipeline… vulnerability
  • CVE-2025-62164 vLLM is an inference and serving engine for large language models (LLMs). vulnerability
  • CVE-2025-9900 A flaw was found in Libtiff. vulnerability
  • CVE-2025-7403 Unsafe handling in bt_conn_tx_processor causes a use-after-free, resulting in a write-before-zero. vulnerability
  • CVE-2025-33045 APTIOV contains vulnerabilities in the BIOS where a privileged user may cause “Write-what-where Condition” and “Exposure of Sensitive… vulnerability
  • CVE-2025-55298 ImageMagick is free and open-source software used for editing and manipulating digital images. vulnerability
  • CVE-2025-22225 VMware ESXi contains an arbitrary write vulnerability. vulnerability
  • CVE-2024-20141 In V5 DA, there is a possible out of bounds write due to a missing bounds check. vulnerability
  • CVE-2024-47438 Substance3D - Painter versions 10.1.0 and earlier are affected by a Write-what-where Condition vulnerability that could lead to a memory… vulnerability
  • CVE-2024-20118 In mms, there is a possible out of bounds write due to an incorrect bounds check. vulnerability
Show all 64 ›

Referenced by CWE · can precede (6)

  • CWE-120 Buffer Copy without Checking Size of Input weakness
  • CWE-134 Use of Externally-Controlled Format String weakness
  • CWE-364 Signal Handler Race Condition weakness
  • CWE-416 Use After Free weakness
  • CWE-479 Signal Handler Use of a Non-reentrant Function weakness
  • CWE-590 Free of Memory not on the Heap weakness

Referenced by CWE · peer of (1)