{"@ID": "787", "@Name": "Out-of-bounds Write", "@Abstraction": "Base", "@Structure": "Simple", "@Status": "Draft", "@Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "Related_Weaknesses": {"Related_Weakness": [{"@Nature": "ChildOf", "@CWE_ID": "119", "@View_ID": "1000", "@Ordinal": "Primary"}, {"@Nature": "ChildOf", "@CWE_ID": "119", "@View_ID": "1003", "@Ordinal": "Primary"}, {"@Nature": "ChildOf", "@CWE_ID": "119", "@View_ID": "1305", "@Ordinal": "Primary"}, {"@Nature": "ChildOf", "@CWE_ID": "119", "@View_ID": "1340", "@Ordinal": "Primary"}]}, "Weakness_Ordinalities": {"Weakness_Ordinality": {"Ordinality": "Resultant", "Description": "At the point when the product writes data to an invalid location, it is likely that a separate weakness already occurred earlier. For example, the product might alter an index, perform incorrect pointer arithmetic, initialize or release memory incorrectly, etc., thus referencing a memory location outside the buffer."}}, "Applicable_Platforms": {"Language": [{"@Class": "Memory-Unsafe", "@Prevalence": "Often"}, {"@Name": "C", "@Prevalence": "Often"}, {"@Name": "C++", "@Prevalence": "Often"}, {"@Class": "Assembly", "@Prevalence": "Undetermined"}], "Technology": {"@Class": "ICS/OT", "@Prevalence": "Often"}}, "Alternate_Terms": {"Alternate_Term": {"Term": "Memory Corruption", "Description": "Often used to describe the consequences of writing to memory outside the bounds of a buffer, or to memory that is otherwise invalid."}}, "Modes_Of_Introduction": {"Introduction": {"Phase": "Implementation"}}, "Likelihood_Of_Exploit": "High", "Common_Consequences": {"Consequence": [{"Scope": "Integrity", "Impact": ["Modify Memory", "Execute Unauthorized Code or Commands"], "Note": "Write operations could cause memory corruption. In some cases, an adversary can modify control data such as return addresses in order to execute unexpected code."}, {"Scope": "Availability", "Impact": "DoS: Crash, Exit, or Restart", "Note": "Attempting to access out-of-range, invalid, or unauthorized memory could cause the product to crash."}, {"Scope": "Other", "Impact": "Unexpected State", "Note": "Subsequent write operations can produce undefined or unexpected results."}]}, "Detection_Methods": {"Detection_Method": [{"@Detection_Method_ID": "DM-1", "Method": "Automated Static Analysis", "Description": {"xhtml:p": ["This weakness can often be detected using automated static analysis tools. Many modern tools use data flow analysis or constraint-based techniques to minimize the number of false positives.", "Automated static analysis generally does not account for environmental considerations when reporting out-of-bounds memory operations. This can make it difficult for users to determine which warnings should be investigated first. For example, an analysis tool might report buffer overflows that originate from command line arguments in a program that is not expected to run with setuid or other special privileges."]}, "Effectiveness": "High", "Effectiveness_Notes": "Detection techniques for buffer-related errors are more mature than for most other weakness types."}, {"@Detection_Method_ID": "DM-2", "Method": "Automated Dynamic Analysis", "Description": "This weakness can be detected using dynamic tools and techniques that interact with the software using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The software's operation may slow down, but it should not become unstable, crash, or generate incorrect results."}, {"@Detection_Method_ID": "DM-15", "Method": "Automated Dynamic Analysis", "Description": "Use tools that are integrated during\n\t      compilation to insert runtime error-checking mechanisms\n\t      related to memory safety errors, such as AddressSanitizer\n\t      (ASan) for C/C++ [REF-1518].", "Effectiveness": "Moderate", "Effectiveness_Notes": "Crafted inputs are necessary to\n\t      reach the code containing the error, such as generated\n\t      by fuzzers.  Also, these tools may reduce performance,\n\t      and they only report the error condition - not the\n\t      original mistake that led to the\n\t      error."}]}, "Potential_Mitigations": {"Mitigation": [{"@Mitigation_ID": "MIT-3", "Phase": "Requirements", "Strategy": "Language Selection", "Description": {"xhtml:p": ["Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.", "For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer.", "Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe."]}}, {"@Mitigation_ID": "MIT-4.1", "Phase": "Architecture and Design", "Strategy": "Libraries or Frameworks", "Description": {"xhtml:p": ["Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.", "Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions."]}, "Effectiveness_Notes": "This is not a complete solution, since many buffer overflows are not related to strings."}, {"@Mitigation_ID": "MIT-10", "Phase": ["Operation", "Build and Compilation"], "Strategy": "Environment Hardening", "Description": {"xhtml:p": ["Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking.", "D3-SFCV (Stack Frame Canary Validation) from D3FEND [REF-1334] discusses canary-based detection in detail."]}, "Effectiveness": "Defense in Depth", "Effectiveness_Notes": {"xhtml:p": "This is not necessarily a complete solution, since these mechanisms only detect certain types of overflows. In addition, the result is still a denial of service, since the typical response is to exit the application."}}, {"@Mitigation_ID": "MIT-9", "Phase": "Implementation", "Description": {"xhtml:p": "Consider adhering to the following rules when allocating and managing an application's memory:", "xhtml:ul": {"xhtml:li": ["Double check that the buffer is as large as specified.", "When using functions that accept a number of bytes to copy, such as strncpy(), be aware that if the destination buffer size is equal to the source buffer size, it may not NULL-terminate the string.", "Check buffer boundaries if accessing the buffer in a loop and make sure there is no danger of writing past the allocated space.", "If necessary, truncate all input strings to a reasonable length before passing them to the copy and concatenation functions."]}}}, {"@Mitigation_ID": "MIT-11", "Phase": ["Operation", "Build and Compilation"], "Strategy": "Environment Hardening", "Description": {"xhtml:p": ["Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code.", "Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64]. Imported modules may be similarly realigned if their default memory addresses conflict with other modules, in a process known as \"rebasing\" (for Windows) and \"prelinking\" (for Linux) [REF-1332] using randomly generated addresses. ASLR for libraries cannot be used in conjunction with prelink since it would require relocating the libraries at run-time, defeating the whole purpose of prelinking.", "For more information on these techniques see D3-SAOR (Segment Address Offset Randomization) from D3FEND [REF-1335]."]}, "Effectiveness": "Defense in Depth", "Effectiveness_Notes": "These techniques do not provide a complete solution.  For instance, exploits frequently use a bug that discloses memory addresses in order to maximize reliability of code execution [REF-1337]. It has also been shown that a side-channel attack can bypass ASLR [REF-1333]."}, {"@Mitigation_ID": "MIT-12", "Phase": "Operation", "Strategy": "Environment Hardening", "Description": {"xhtml:p": ["Use a CPU and operating system that offers Data Execution Protection (using hardware NX or XD bits) or the equivalent techniques that simulate this feature in software, such as PaX [REF-60] [REF-61]. These techniques ensure that any instruction executed is exclusively at a memory address that is part of the code segment.", "For more information on these techniques see D3-PSEP (Process Segment Execution Prevention) from D3FEND [REF-1336]."]}, "Effectiveness": "Defense in Depth", "Effectiveness_Notes": "This is not a complete solution, since buffer overflows could be used to overwrite nearby variables to modify the software's state in dangerous ways. In addition, it cannot be used in cases in which self-modifying code is required. Finally, an attack could still cause a denial of service, since the typical response is to exit the application."}, {"@Mitigation_ID": "MIT-13", "Phase": "Implementation", "Description": "Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available.", "Effectiveness": "Moderate", "Effectiveness_Notes": "This approach is still susceptible to calculation errors, including issues such as off-by-one errors (CWE-193) and incorrectly calculating buffer lengths (CWE-131)."}]}, "Demonstrative_Examples": {"Demonstrative_Example": [{"Intro_Text": "The following code attempts to save four different identification numbers into an array.", "Example_Code": {"@Nature": "Bad", "@Language": "C", "xhtml:div": {"xhtml:br": [null, null, null, null, null, null, null], "#text": "int id_sequence[3];\n                     /* Populate the id array. */\n                     id_sequence[0] = 123;id_sequence[1] = 234;id_sequence[2] = 345;id_sequence[3] = 456;"}}, "Body_Text": "Since the array is only allocated to hold three elements, the valid indices are 0 to 2; so, the assignment to id_sequence[3] is out of bounds."}, {"@Demonstrative_Example_ID": "DX-114", "Intro_Text": "In the following code, it is possible to request that memcpy move a much larger segment of memory than assumed:", "Example_Code": {"@Nature": "Bad", "@Language": "C", "xhtml:div": {"xhtml:div": [{"@style": "margin-left:1em;", "xhtml:div": {"xhtml:br": [null, null, null, null, null, null], "xhtml:i": ["/* if chunk info is valid, return the size of usable memory,", "* else, return -1 to indicate an error", "*/"], "#text": "..."}}, {"@style": "margin-left:1em;", "xhtml:br": [null, null], "#text": "...memcpy(destBuf, srcBuf, (returnChunkSize(destBuf)-1));..."}], "xhtml:br": null, "#text": "int returnChunkSize(void *) {}int main() {}"}}, "Body_Text": "If returnChunkSize() happens to encounter an error it will return -1. Notice that the return value is not checked before the memcpy operation (CWE-252), so -1 can be passed as the size argument to memcpy() (CWE-805). Because memcpy() assumes that the value is unsigned, it will be interpreted as MAXINT-1 (CWE-195), and therefore will copy far more memory than is likely available to the destination buffer (CWE-787, CWE-788)."}, {"@Demonstrative_Example_ID": "DX-1", "Intro_Text": "This code takes an IP address from the user and verifies that it is well formed. It then looks up the hostname and copies it into a buffer.", "Example_Code": {"@Nature": "Bad", "@Language": "C", "xhtml:div": {"xhtml:div": {"@style": "margin-left:1em;", "xhtml:div": {"xhtml:br": [null, null, null, null, null, null, null, null, null, null], "xhtml:i": "/*routine that ensures user_supplied_addr is in the right format for conversion */", "#text": "struct hostent *hp;in_addr_t *addr;char hostname[64];in_addr_t inet_addr(const char *cp);\n                           \n                           \n                           \n                           validate_addr_form(user_supplied_addr);addr = inet_addr(user_supplied_addr);hp = gethostbyaddr( addr, sizeof(struct in_addr), AF_INET);strcpy(hostname, hp->h_name);"}}, "#text": "void host_lookup(char *user_supplied_addr){}"}}, "Body_Text": ["This function allocates a buffer of 64 bytes to store the hostname. However, there is no guarantee that the hostname will not be larger than 64 bytes. If an attacker specifies an address which resolves to a very large hostname, then the function may overwrite sensitive data or even relinquish control flow to the attacker.", "Note that this example also contains an unchecked return value (CWE-252) that can lead to a NULL pointer dereference (CWE-476)."]}, {"@Demonstrative_Example_ID": "DX-19", "Intro_Text": "This code applies an encoding procedure to an input string and stores it into a buffer.", "Example_Code": {"@Nature": "Bad", "@Language": "C", "xhtml:div": {"xhtml:div": {"@style": "margin-left:1em;", "xhtml:div": {"xhtml:br": [null, null, null, null, null], "xhtml:div": [{"@style": "margin-left:1em;", "#text": "die(\"user string too long, die evil hacker!\");"}, {"@style": "margin-left:1em;", "xhtml:div": {"xhtml:div": [{"@style": "margin-left:1em;", "xhtml:br": [null, null, null, null], "#text": "dst_buf[dst_index++] = '&';dst_buf[dst_index++] = 'a';dst_buf[dst_index++] = 'm';dst_buf[dst_index++] = 'p';dst_buf[dst_index++] = ';';"}, {"@style": "margin-left:1em;", "xhtml:div": {"xhtml:br": [null, null], "xhtml:i": "/* encode to &lt; */"}}], "xhtml:br": [null, null], "#text": "if( '&' == user_supplied_string[i] ){}else if ('<' == user_supplied_string[i] ){}else dst_buf[dst_index++] = user_supplied_string[i];"}}], "#text": "int i, dst_index;char *dst_buf = (char*)malloc(4*sizeof(char) * MAX_SIZE);if ( MAX_SIZE <= strlen(user_supplied_string) ){}dst_index = 0;for ( i = 0; i < strlen(user_supplied_string); i++ ){}return dst_buf;"}}, "#text": "char * copy_input(char *user_supplied_string){}"}}, "Body_Text": "The programmer attempts to encode the ampersand character in the user-controlled string. However, the length of the string is validated before the encoding procedure is applied. Furthermore, the programmer assumes encoding expansion will only expand a given character by a factor of 4, while the encoding of the ampersand expands by 5. As a result, when the encoding procedure expands the string it is possible to overflow the destination buffer if the attacker provides a string of many ampersands."}, {"@Demonstrative_Example_ID": "DX-87", "Intro_Text": "In the following C/C++ code, a utility function is used to trim trailing whitespace from a character string. The function copies the input string to a local character string and uses a while statement to remove the trailing whitespace by moving backward through the string and overwriting whitespace with a NUL character.", "Example_Code": {"@Nature": "Bad", "@Language": "C", "xhtml:div": {"xhtml:div": {"@style": "margin-left:1em;", "xhtml:div": {"xhtml:br": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], "xhtml:i": ["// copy input string to a temporary string", "// trim trailing whitespace", "// return string without trailing whitespace"], "xhtml:div": [{"@style": "margin-left:1em;", "#text": "message[index] = strMessage[index];"}, {"@style": "margin-left:1em;", "xhtml:br": null, "#text": "message[len] = '\\0';len--;"}], "#text": "char *retMessage;char *message = malloc(sizeof(char)*(length+1));\n                           \n                           \n                           char message[length+1];int index;for (index = 0; index < length; index++) {}message[index] = '\\0';\n                           \n                           \n                           int len = index-1;while (isspace(message[len])) {}\n                           \n                           \n                           retMessage = message;return retMessage;"}}, "#text": "char* trimTrailingWhitespace(char *strMessage, int length) {}"}}, "Body_Text": "However, this function can cause a buffer underwrite if the input character string contains all whitespace. On some systems the while statement will move backwards past the beginning of a character string and will call the isspace() function on an address outside of the bounds of the local buffer."}, {"@Demonstrative_Example_ID": "DX-20", "Intro_Text": "The following code allocates memory for a maximum number of widgets. It then gets a user-specified number of widgets, making sure that the user does not request too many. It then initializes the elements of the array using InitializeWidget(). Because the number of widgets can vary for each request, the code inserts a NULL pointer to signify the location of the last widget.", "Example_Code": {"@Nature": "Bad", "@Language": "C", "xhtml:div": {"xhtml:br": [null, null, null, null, null, null, null, null, null, null], "xhtml:div": [{"@style": "margin-left:1em;", "#text": "ExitError(\"Incorrect number of widgets requested!\");"}, {"@style": "margin-left:1em;", "#text": "WidgetList[i] = InitializeWidget();"}], "#text": "int i;unsigned int numWidgets;Widget **WidgetList;\n                     numWidgets = GetUntrustedSizeValue();if ((numWidgets == 0) || (numWidgets > MAX_NUM_WIDGETS)) {}WidgetList = (Widget **)malloc(numWidgets * sizeof(Widget *));printf(\"WidgetList ptr=%p\\n\", WidgetList);for(i=0; i<numWidgets; i++) {}WidgetList[numWidgets] = NULL;showWidgets(WidgetList);"}}, "Body_Text": "However, this code contains an off-by-one calculation error (CWE-193). It allocates exactly enough space to contain the specified number of widgets, but it does not include the space for the NULL pointer. As a result, the allocated buffer is smaller than it is supposed to be (CWE-131). So if the user ever requests MAX_NUM_WIDGETS, there is an out-of-bounds write (CWE-787) when the NULL is assigned. Depending on the environment and compilation settings, this could cause memory corruption."}, {"@Demonstrative_Example_ID": "DX-88", "Intro_Text": "The following is an example of code that may result in a buffer underwrite. This code is attempting to replace the substring \"Replace Me\" in destBuf with the string stored in srcBuf. It does so by using the function strstr(), which returns a pointer to the found substring in destBuf.  Using pointer arithmetic, the starting index of the substring is found.", "Example_Code": {"@Nature": "Bad", "@Language": "C", "xhtml:div": {"xhtml:div": {"@style": "margin-left:1em;", "xhtml:br": [null, null, null, null], "#text": "...\n                     char *result = strstr(destBuf, \"Replace Me\");\n                     int idx = result - destBuf;\n                     strcpy(&destBuf[idx], srcBuf);\n                     ..."}, "#text": "int main() {\n                     }"}}, "Body_Text": "In the case where the substring is not found in destBuf, strstr() will return NULL, causing the pointer arithmetic to be undefined, potentially setting the value of idx to a negative number.  If idx is negative, this will result in a buffer underwrite of destBuf."}]}, "Observed_Examples": {"Observed_Example": [{"Reference": "CVE-2025-27363", "Description": "Font rendering library does not properly\n               handle assigning a signed short value to an unsigned\n               long (CWE-195), leading to an integer wraparound\n               (CWE-190), causing too small of a buffer (CWE-131),\n               leading to an out-of-bounds write\n               (CWE-787).", "Link": "https://www.cve.org/CVERecord?id=CVE-2025-27363"}, {"Reference": "CVE-2023-1017", "Description": "The reference implementation code for a Trusted Platform Module does not implement length checks on data, allowing for an attacker to write 2 bytes past the end of a buffer.", "Link": "https://www.cve.org/CVERecord?id=CVE-2023-1017"}, {"Reference": "CVE-2021-21220", "Description": "Chain: insufficient input validation (CWE-20) in browser allows heap corruption (CWE-787), as exploited in the wild per CISA KEV.", "Link": "https://www.cve.org/CVERecord?id=CVE-2021-21220"}, {"Reference": "CVE-2021-28664", "Description": "GPU kernel driver allows memory corruption because a user can obtain read/write access to read-only pages, as exploited in the wild per CISA KEV.", "Link": "https://www.cve.org/CVERecord?id=CVE-2021-28664"}, {"Reference": "CVE-2020-17087", "Description": "Chain: integer truncation (CWE-197) causes small buffer allocation (CWE-131) leading to out-of-bounds write (CWE-787) in kernel pool, as exploited in the wild per CISA KEV.", "Link": "https://www.cve.org/CVERecord?id=CVE-2020-17087"}, {"Reference": "CVE-2020-1054", "Description": "Out-of-bounds write in kernel-mode driver, as exploited in the wild per CISA KEV.", "Link": "https://www.cve.org/CVERecord?id=CVE-2020-1054"}, {"Reference": "CVE-2020-0041", "Description": "Escape from browser sandbox using out-of-bounds write due to incorrect bounds check, as exploited in the wild per CISA KEV.", "Link": "https://www.cve.org/CVERecord?id=CVE-2020-0041"}, {"Reference": "CVE-2020-0968", "Description": "Memory corruption in web browser scripting engine, as exploited in the wild per CISA KEV.", "Link": "https://www.cve.org/CVERecord?id=CVE-2020-0968"}, {"Reference": "CVE-2020-0022", "Description": "chain: mobile phone Bluetooth implementation does not include offset when calculating packet length (CWE-682), leading to out-of-bounds write (CWE-787)", "Link": "https://www.cve.org/CVERecord?id=CVE-2020-0022"}, {"Reference": "CVE-2019-1010006", "Description": "Chain: compiler optimization (CWE-733) removes or modifies code used to detect integer overflow (CWE-190), allowing out-of-bounds write (CWE-787).", "Link": "https://www.cve.org/CVERecord?id=CVE-2019-1010006"}, {"Reference": "CVE-2009-1532", "Description": "malformed inputs cause accesses of uninitialized or previously-deleted objects, leading to memory corruption", "Link": "https://www.cve.org/CVERecord?id=CVE-2009-1532"}, {"Reference": "CVE-2009-0269", "Description": "chain: -1 value from a function call was intended to indicate an error, but is used as an array index instead.", "Link": "https://www.cve.org/CVERecord?id=CVE-2009-0269"}, {"Reference": "CVE-2002-2227", "Description": "Unchecked length of SSLv2 challenge value leads to buffer underflow.", "Link": "https://www.cve.org/CVERecord?id=CVE-2002-2227"}, {"Reference": "CVE-2007-4580", "Description": "Buffer underflow from a small size value with a large buffer (length parameter inconsistency, CWE-130)", "Link": "https://www.cve.org/CVERecord?id=CVE-2007-4580"}, {"Reference": "CVE-2007-4268", "Description": "Chain: integer signedness error (CWE-195) passes signed comparison, leading to heap overflow (CWE-122)", "Link": "https://www.cve.org/CVERecord?id=CVE-2007-4268"}, {"Reference": "CVE-2009-2550", "Description": "Classic stack-based buffer overflow in media player using a long entry in a playlist", "Link": "https://www.cve.org/CVERecord?id=CVE-2009-2550"}, {"Reference": "CVE-2009-2403", "Description": "Heap-based buffer overflow in media player using a long entry in a playlist", "Link": "https://www.cve.org/CVERecord?id=CVE-2009-2403"}]}, "Functional_Areas": {"Functional_Area": "Memory Management"}, "Affected_Resources": {"Affected_Resource": "Memory"}, "Taxonomy_Mappings": {"Taxonomy_Mapping": [{"@Taxonomy_Name": "ISA/IEC 62443", "Entry_ID": "Part 3-3", "Entry_Name": "Req SR 3.5"}, {"@Taxonomy_Name": "ISA/IEC 62443", "Entry_ID": "Part 4-1", "Entry_Name": "Req SI-1"}, {"@Taxonomy_Name": "ISA/IEC 62443", "Entry_ID": "Part 4-1", "Entry_Name": "Req SI-2"}, {"@Taxonomy_Name": "ISA/IEC 62443", "Entry_ID": "Part 4-1", "Entry_Name": "Req SVV-1"}, {"@Taxonomy_Name": "ISA/IEC 62443", "Entry_ID": "Part 4-1", "Entry_Name": "Req SVV-3"}, {"@Taxonomy_Name": "ISA/IEC 62443", "Entry_ID": "Part 4-2", "Entry_Name": "Req CR 3.5"}]}, "References": {"Reference": [{"@External_Reference_ID": "REF-1029"}, {"@External_Reference_ID": "REF-7", "@Section": "Chapter 5, \"Stack Overruns\" Page 129"}, {"@External_Reference_ID": "REF-7", "@Section": "Chapter 5, \"Heap Overruns\" Page 138"}, {"@External_Reference_ID": "REF-44", "@Section": "\"Sin 5: Buffer Overruns.\" Page 89"}, {"@External_Reference_ID": "REF-62", "@Section": "Chapter 3, \"Nonexecutable Stack\", Page 76"}, {"@External_Reference_ID": "REF-62", "@Section": "Chapter 5, \"Protection Mechanisms\", Page 189"}, {"@External_Reference_ID": "REF-90"}, {"@External_Reference_ID": "REF-56"}, {"@External_Reference_ID": "REF-57"}, {"@External_Reference_ID": "REF-58"}, {"@External_Reference_ID": "REF-60"}, {"@External_Reference_ID": "REF-61"}, {"@External_Reference_ID": "REF-64"}, {"@External_Reference_ID": "REF-1332"}, {"@External_Reference_ID": "REF-1333"}, {"@External_Reference_ID": "REF-1334"}, {"@External_Reference_ID": "REF-1335"}, {"@External_Reference_ID": "REF-1336"}, {"@External_Reference_ID": "REF-1337", "@Section": "Memory information leaks"}, {"@External_Reference_ID": "REF-1477"}, {"@External_Reference_ID": "REF-1518"}]}, "Mapping_Notes": {"Usage": "Allowed-with-Review", "Rationale": "This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities. However, closer examination is required.", "Comments": "While this CWE is allowed for mapping, it has more specific children that might be a better fit. Carefully read both the name and description to ensure that this mapping is appropriate. Consider the root cause errors that have led to the out-of-bounds write by examining \"CanFollow\" relationships for this entry.", "Reasons": {"Reason": [{"@Type": "Frequent Misuse"}, {"@Type": "Abstraction"}]}, "Suggestions": {"Suggestion": [{"@CWE_ID": "120", "@Comment": "Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')"}, {"@CWE_ID": "121", "@Comment": "Stack-based Buffer Overflow"}, {"@CWE_ID": "122", "@Comment": "Heap-based Buffer Overflow"}, {"@CWE_ID": "124", "@Comment": "Buffer Underwrite ('Buffer Underflow')"}]}}, "Content_History": {"Submission": {"Submission_Name": "CWE Content Team", "Submission_Organization": "MITRE", "Submission_Date": "2009-10-21", "Submission_Version": "1.6", "Submission_ReleaseDate": "2009-10-29"}, "Modification": [{"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2010-02-16", "Modification_Version": "1.8", "Modification_ReleaseDate": "2010-02-16", "Modification_Comment": "updated Demonstrative_Examples"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2010-09-27", "Modification_Version": "1.10", "Modification_ReleaseDate": "2010-09-27", "Modification_Comment": "updated Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2011-06-01", "Modification_Version": "1.13", "Modification_ReleaseDate": "2011-06-01", "Modification_Comment": "updated Common_Consequences"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2014-06-23", "Modification_Version": "2.7", "Modification_ReleaseDate": "2014-06-23", "Modification_Comment": "updated Demonstrative_Examples"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2015-12-07", "Modification_Version": "2.9", "Modification_ReleaseDate": "2015-12-07", "Modification_Comment": "updated Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2018-03-27", "Modification_Version": "3.1", "Modification_ReleaseDate": "2018-03-27", "Modification_Comment": "updated Description"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2019-09-19", "Modification_Version": "3.4", "Modification_ReleaseDate": "2019-09-19", "Modification_Comment": "updated Applicable_Platforms, Demonstrative_Examples, Detection_Factors, Likelihood_of_Exploit, Observed_Examples, Potential_Mitigations, References, Relationships, Time_of_Introduction"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2020-02-24", "Modification_Version": "4.0", "Modification_ReleaseDate": "2020-02-24", "Modification_Comment": "updated Observed_Examples, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2020-06-25", "Modification_Version": "4.1", "Modification_ReleaseDate": "2020-06-25", "Modification_Comment": "updated Observed_Examples"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2020-08-20", "Modification_Version": "4.2", "Modification_ReleaseDate": "2020-08-20", "Modification_Comment": "updated Alternate_Terms, Demonstrative_Examples, Observed_Examples, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2020-12-10", "Modification_Version": "4.3", "Modification_ReleaseDate": "2020-12-10", "Modification_Comment": "updated Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2021-03-15", "Modification_Version": "4.4", "Modification_ReleaseDate": "2021-03-15", "Modification_Comment": "updated Demonstrative_Examples"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2021-07-20", "Modification_Version": "4.5", "Modification_ReleaseDate": "2021-07-20", "Modification_Comment": "updated Demonstrative_Examples, Potential_Mitigations, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2022-06-28", "Modification_Version": "4.8", "Modification_ReleaseDate": "2022-06-28", "Modification_Comment": "updated Observed_Examples, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2022-10-13", "Modification_Version": "4.9", "Modification_ReleaseDate": "2022-10-13", "Modification_Comment": "updated Applicable_Platforms"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-01-31", "Modification_Version": "4.10", "Modification_ReleaseDate": "2023-01-31", "Modification_Comment": "updated Alternate_Terms, Demonstrative_Examples, Description"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-04-27", "Modification_Version": "4.11", "Modification_ReleaseDate": "2023-04-27", "Modification_Comment": "updated Potential_Mitigations, References, Relationships, Taxonomy_Mappings"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-06-29", "Modification_Version": "4.12", "Modification_ReleaseDate": "2023-06-29", "Modification_Comment": "updated Mapping_Notes, Relationships, Taxonomy_Mappings"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2024-02-29", "Modification_Version": "4.14", "Modification_ReleaseDate": "2024-02-29", "Modification_Comment": "updated Demonstrative_Examples"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2024-07-16", "Modification_Version": "4.15", "Modification_ReleaseDate": "2024-07-16", "Modification_Comment": "updated Alternate_Terms, Common_Consequences, Description, Diagram, Weakness_Ordinalities"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2024-11-19", "Modification_Version": "4.16", "Modification_ReleaseDate": "2024-11-19", "Modification_Comment": "updated Observed_Examples, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2025-04-03", "Modification_Version": "4.17", "Modification_ReleaseDate": "2025-04-03", "Modification_Comment": "updated Observed_Examples, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2025-09-09", "Modification_Version": "4.18", "Modification_ReleaseDate": "2025-09-09", "Modification_Comment": "updated Affected_Resources, Functional_Areas, References"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2025-12-11", "Modification_Version": "4.19", "Modification_ReleaseDate": "2025-12-11", "Modification_Comment": "updated Applicable_Platforms, Detection_Factors, References, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2026-04-30", "Modification_Version": "4.20", "Modification_ReleaseDate": "2026-04-30", "Modification_Comment": "updated Mapping_Notes"}], "Contribution": [{"@Type": "Content", "Contribution_Name": "\"Mapping CWE to 62443\" Sub-Working Group", "Contribution_Organization": "CWE-CAPEC ICS/OT SIG", "Contribution_Date": "2023-04-25", "Contribution_Comment": "Suggested mappings to ISA/IEC 62443."}, {"@Type": "Content", "Contribution_Name": "Abhi Balakrishnan", "Contribution_Date": "2024-02-29", "Contribution_Version": "4.15", "Contribution_ReleaseDate": "2024-07-16", "Contribution_Comment": "Provided diagram to improve CWE usability"}]}}
