CWE-122
Weakness AllowedHeap-based Buffer Overflow
Abstraction: Variant · Status: Draft
The product writes past the end of a buffer that was allocated on the heap.
Mapping guidance
This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
Modes of introduction
Detection methods
Fuzzing
Fuzz testing (fuzzing) is a powerful technique for generating large numbers of diverse inputs - either randomly or algorithmically - and dynamically invoking the code with those inputs. Even with random inputs, it is often capable of generating unexpected results such as crashes, memory corruption, or resource consumption. Fuzzing effectively produces repeatable test cases that clearly indicate bugs, which helps developers to diagnose the issues.
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.
Notes
Terminology
There is significant inconsistency regarding the "buffer overflow" term, which can have multiple interpretations and uses. Many people mean "writing past the end of a buffer." Others mean "writing past the end of a buffer, or before the beginning of a buffer." Still others might include "read" in the term.
Content history
Contributed or reviewed taxonomy mappings for ISA/IEC 62443
updated Potential_Mitigations, Time_of_Introduction
added/updated white box definitions
updated Applicable_Platforms, Common_Consequences, Relationships, Other_Notes, Taxonomy_Mappings, Weakness_Ordinalities
updated Common_Consequences, Other_Notes, Relationship_Notes
updated Common_Consequences, Relationships
updated Relationships
updated References
updated Common_Consequences
updated Demonstrative_Examples, References, Relationships
updated Demonstrative_Examples
updated Demonstrative_Examples, Potential_Mitigations
updated Observed_Examples
updated Relationships, Taxonomy_Mappings
updated Causal_Nature, Likelihood_of_Exploit, Observed_Examples, References, Relationships, Taxonomy_Mappings, White_Box_Definitions
updated References
updated Relationships
updated Relationships
updated References
updated Observed_Examples
updated Detection_Factors, Potential_Mitigations, References, Relationships, Time_of_Introduction
updated Mapping_Notes
updated Observed_Examples
updated Observed_Examples, Taxonomy_Mappings
updated Applicable_Platforms
updated Functional_Areas, References
updated Alternate_Terms, Applicable_Platforms, Detection_Factors, Observed_Examples, References, Relationship_Notes, Terminology_Notes
updated Relationships
updated Description, Diagram
7164 vulnerabilities reference this CWE, most recent first.
GHSA-WWG2-55PQ-3MVR
Vulnerability from github – Published: 2026-11-10 21:32 – Updated: 2026-11-10 21:32Heap-based buffer overflow in Windows File Server Resource Management Service allows an authorized attacker to elevate privileges locally.
{
"affected": [],
"aliases": [
"CVE-2026-113765"
],
"database_specific": {
"cwe_ids": [
"CWE-122"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-10T19:18:55Z",
"severity": "HIGH"
},
"details": "Heap-based buffer overflow in Windows File Server Resource Management Service allows an authorized attacker to elevate privileges locally.",
"id": "GHSA-wwg2-55pq-3mvr",
"modified": "2026-11-10T21:32:47Z",
"published": "2026-11-10T21:32:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113765"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-113765"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WWJ3-XJMP-VQ7M
Vulnerability from github – Published: 2024-08-14 15:31 – Updated: 2024-08-14 15:31InDesign Desktop versions ID19.4, ID18.5.2 and earlier are affected by a Heap-based Buffer Overflow vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interaction in that a victim must open a malicious file.
{
"affected": [],
"aliases": [
"CVE-2024-41853"
],
"database_specific": {
"cwe_ids": [
"CWE-122",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-08-14T15:15:30Z",
"severity": "HIGH"
},
"details": "InDesign Desktop versions ID19.4, ID18.5.2 and earlier are affected by a Heap-based Buffer Overflow vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interaction in that a victim must open a malicious file.",
"id": "GHSA-wwj3-xjmp-vq7m",
"modified": "2024-08-14T15:31:18Z",
"published": "2024-08-14T15:31:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-41853"
},
{
"type": "WEB",
"url": "https://helpx.adobe.com/security/products/indesign/apsb24-56.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WWJJ-F99X-693P
Vulnerability from github – Published: 2026-10-13 21:34 – Updated: 2026-10-13 21:34Heap-based buffer overflow in Windows Management Instrumentation allows an authorized attacker to elevate privileges locally.
{
"affected": [],
"aliases": [
"CVE-2026-83724"
],
"database_specific": {
"cwe_ids": [
"CWE-122"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-13T19:20:17Z",
"severity": "HIGH"
},
"details": "Heap-based buffer overflow in Windows Management Instrumentation allows an authorized attacker to elevate privileges locally.",
"id": "GHSA-wwjj-f99x-693p",
"modified": "2026-10-13T21:34:44Z",
"published": "2026-10-13T21:34:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-83724"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-83724"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WWPG-9W4C-5X8R
Vulnerability from github – Published: 2026-11-10 21:32 – Updated: 2026-11-10 21:32An elevation of privilege vulnerability exists in the Windows Installer when the Windows Installer fails to properly sanitize input leading to an insecure library loading behavior. A locally authenticated attacker could run arbitrary code with elevated system privileges. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. The security update addresses the vulnerability by correcting the input sanitization error to preclude unintended elevation.
{
"affected": [],
"aliases": [
"CVE-2026-105507"
],
"database_specific": {
"cwe_ids": [
"CWE-122"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-10T19:17:49Z",
"severity": "HIGH"
},
"details": "An elevation of privilege vulnerability exists in the Windows Installer when the Windows Installer fails to properly sanitize input leading to an insecure library loading behavior.\nA locally authenticated attacker could run arbitrary code with elevated system privileges. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights.\nThe security update addresses the vulnerability by correcting the input sanitization error to preclude unintended elevation.",
"id": "GHSA-wwpg-9w4c-5x8r",
"modified": "2026-11-10T21:32:19Z",
"published": "2026-11-10T21:32:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-105507"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-105507"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WWQ5-JFQH-3VH9
Vulnerability from github – Published: 2026-09-08 18:32 – Updated: 2026-09-08 18:32Heap-based buffer overflow in Windows Print Spooler Components allows an authorized attacker to elevate privileges over a network.
{
"affected": [],
"aliases": [
"CVE-2026-69346"
],
"database_specific": {
"cwe_ids": [
"CWE-122"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-08T18:18:53Z",
"severity": "HIGH"
},
"details": "Heap-based buffer overflow in Windows Print Spooler Components allows an authorized attacker to elevate privileges over a network.",
"id": "GHSA-wwq5-jfqh-3vh9",
"modified": "2026-09-08T18:32:25Z",
"published": "2026-09-08T18:32:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-69346"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-69346"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WWRH-WC9Q-67HR
Vulnerability from github – Published: 2026-09-08 18:32 – Updated: 2026-09-08 18:32Heap-based buffer overflow in Windows NTFS allows an authorized attacker to execute code locally.
{
"affected": [],
"aliases": [
"CVE-2026-69709"
],
"database_specific": {
"cwe_ids": [
"CWE-122"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-08T18:19:42Z",
"severity": "HIGH"
},
"details": "Heap-based buffer overflow in Windows NTFS allows an authorized attacker to execute code locally.",
"id": "GHSA-wwrh-wc9q-67hr",
"modified": "2026-09-08T18:32:54Z",
"published": "2026-09-08T18:32:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-69709"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-69709"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WWW6-X9J5-657J
Vulnerability from github – Published: 2026-08-11 18:31 – Updated: 2026-08-11 18:31Heap-based buffer overflow in Windows DHCP Client allows an authorized attacker to elevate privileges locally.
{
"affected": [],
"aliases": [
"CVE-2026-62736"
],
"database_specific": {
"cwe_ids": [
"CWE-122"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-11T17:18:25Z",
"severity": "HIGH"
},
"details": "Heap-based buffer overflow in Windows DHCP Client allows an authorized attacker to elevate privileges locally.",
"id": "GHSA-www6-x9j5-657j",
"modified": "2026-08-11T18:31:17Z",
"published": "2026-08-11T18:31:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-62736"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-62736"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WWXH-P9HV-8WFX
Vulnerability from github – Published: 2025-08-14 06:30 – Updated: 2025-08-14 06:30Netskope was notified about a potential gap in its agent (NS Client) on Windows systems. If this gap is successfully exploited, an unprivileged user can trigger a heap overflow in the epdlpdrv.sys driver, leading to a Blue-Screen-of-Death (BSOD). Successful exploitation can also potentially be performed by an unprivileged user whose NS Client is configured to use Endpoint DLP. A successful exploit can result in a denial-of-service for the local machine.
{
"affected": [],
"aliases": [
"CVE-2025-5942"
],
"database_specific": {
"cwe_ids": [
"CWE-122"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-08-14T05:15:26Z",
"severity": "MODERATE"
},
"details": "Netskope was notified about a potential gap in its agent (NS Client) on Windows systems. If this gap is successfully exploited, an unprivileged user can trigger a heap overflow in the epdlpdrv.sys driver, leading to a Blue-Screen-of-Death (BSOD). Successful exploitation can also potentially be performed by an unprivileged user whose NS Client is configured to use Endpoint DLP. A successful exploit can result in a denial-of-service for the local machine.",
"id": "GHSA-wwxh-p9hv-8wfx",
"modified": "2025-08-14T06:30:33Z",
"published": "2025-08-14T06:30:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-5942"
},
{
"type": "WEB",
"url": "https://www.netskope.com/company/security-compliance-and-assurance/security-advisories-and-disclosures/netskope-security-advisory-nskpsa-2025-003"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-WX47-2QJR-RRR9
Vulnerability from github – Published: 2026-10-13 21:34 – Updated: 2026-10-13 21:34Heap-based buffer overflow in Microsoft Office Excel allows an unauthorized attacker to execute code over a network.
{
"affected": [],
"aliases": [
"CVE-2026-77902"
],
"database_specific": {
"cwe_ids": [
"CWE-122"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-13T19:19:53Z",
"severity": "HIGH"
},
"details": "Heap-based buffer overflow in Microsoft Office Excel allows an unauthorized attacker to execute code over a network.",
"id": "GHSA-wx47-2qjr-rrr9",
"modified": "2026-10-13T21:34:23Z",
"published": "2026-10-13T21:34:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-77902"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-77902"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WX4F-9WF4-26P4
Vulnerability from github – Published: 2024-05-14 18:30 – Updated: 2026-01-05 18:30TinyWeb 1.94 and below allows unauthenticated remote attackers to cause a denial of service (Buffer Overflow) when sending excessively large elements in the request line.
{
"affected": [],
"aliases": [
"CVE-2024-34199"
],
"database_specific": {
"cwe_ids": [
"CWE-122",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-05-14T15:38:32Z",
"severity": "HIGH"
},
"details": "TinyWeb 1.94 and below allows unauthenticated remote attackers to cause a denial of service (Buffer Overflow) when sending excessively large elements in the request line.",
"id": "GHSA-wx4f-9wf4-26p4",
"modified": "2026-01-05T18:30:20Z",
"published": "2024-05-14T18:30:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-34199"
},
{
"type": "WEB",
"url": "https://github.com/maximmasiutin/TinyWeb/commit/2584082"
},
{
"type": "WEB",
"url": "https://github.com/maximmasiutin/TinyWeb/commit/d49c3da"
},
{
"type": "WEB",
"url": "https://github.com/DMCERTCE/PoC_Tiny_Overflow"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
Pre-design: Use a language or compiler that performs automatic bounds checking.
Mitigation
Use an abstraction library to abstract away risky APIs. Not a complete solution.
Mitigation MIT-10
Strategy: Environment Hardening
- 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.
Mitigation MIT-11
Strategy: Environment Hardening
- 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].
Mitigation
Implement and perform bounds checking on input.
Mitigation
Strategy: Libraries or Frameworks
Do not use dangerous functions such as gets. Look for their safe equivalent, which checks for the boundary.
Mitigation
Use OS-level preventative functionality. This is not a complete solution, but it provides some defense in depth.
CAPEC-92: Forced Integer Overflow
This attack forces an integer variable to go out of range. The integer variable is often used as an offset such as size of memory allocation or similarly. The attacker would typically control the value of such variable and try to get it out of range. For instance the integer in question is incremented past the maximum possible value, it may wrap to become a very small, or negative number, therefore providing a very incorrect value which can lead to unexpected behavior. At worst the attacker can execute arbitrary code.