CWE-123: Write-what-where Condition
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.
Last updated
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.
Last updated
62 recorded CVEs are caused by CWE-123 (Write-what-where Condition), including 1 in CISA's KEV (Known Exploited Vulnerabilities) catalog. KEVs are shown first. 21 new CWE-123 CVEs have been recorded so far in 2026 (7 in 2025).
VMware ESXi Arbitrary Write Vulnerability
llama.cpp allows write-what-where in rpc_server::set_tensor
OpenImageIO RLE encoded BMP image out-of-bounds write vulnerability
Eclipse CycloneDDS Write-what-where Condition
AUVESY Versiondog
PAN-OS: Panorama External control of file vulnerability leads to privilege escalation
Write-what-where Condition in Honeywell Experion PKS
RTMPDump librtmp AMF3 Class Member Count Remote Code Execution Vulnerability
BioStar BIOS Update Utility IOCTL BSMEM64_W10.sys sub_110BC write-what-where
BioStar Temperature Monitor Utility IOCTL BS_HWMIO64_W10.sys sub_1105C write-what-where
BioStar VALKYRIE AURORA IOCTL BS_RVSIO64.sys sub_1105C write-what-where
Showing 12 of 62 recorded CWE-123 CVEs. Get an alert for each new one, with AI-written analysis and fixes.
Monitor these CVEsWhat can happen when CWE-123 is exploited.
Modify Memory, Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity, DoS: Crash, Exit, or Restart, Bypass Protection Mechanism
Affects: Integrity, Confidentiality, Availability, Access Control
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.
DoS: Crash, Exit, or Restart, Modify Memory
Affects: Integrity, Availability
Many memory accesses can lead to program termination, such as when writing to addresses that are invalid for the current process.
Bypass Protection Mechanism, Other
Affects: Access Control, Other
When the consequence is arbitrary code execution, this can often be used to subvert any other security service.
Typically introduced during these phases of the software lifecycle.
Languages
Practical mitigations for CWE-123, grouped by where in the lifecycle they apply.
Use a language that provides appropriate memory abstractions.
Use OS-level preventative functionality integrated after the fact. Not a complete solution.
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
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++ [3].
Effectiveness: Moderate
MITRE examples of the weakness in code.
The classic example of a write-what-where condition occurs when the accounting information for memory allocations is overwritten in a particular fashion. Here is an example of potentially vulnerable code:
Vulnerable example
#define BUFSIZE 256
int main(int argc, char **argv) {
char *buf1 = (char *) malloc(BUFSIZE);
char *buf2 = (char *) malloc(BUFSIZE);
strcpy(buf1, argv[1]);
free(buf2);
}Real CVEs that MITRE cites as examples of this weakness.
Common questions about CWE-123.
Weakness data is sourced from the MITRE CWE catalog (v4.21). CVE associations are aggregated and kept current by RadicalNotion.AI.
Get an alert when a new CWE-123 CVE affects your products, with AI-written analysis and remediation steps.