CWE-131: Incorrect Calculation of Buffer Size, published in 2023
Filter
The product does not correctly calculate the size to be used when allocating a buffer.
What the weakness is: CWE-131 at MITRE. All weaknesses
Related attack patterns (CAPEC): 2
- CAPEC-47 Buffer Overflow via Parameter Expansion Likelihood: Medium · Severity: High
- CAPEC-100 Overflow Buffers Likelihood: High · Severity: Very High
The attack patterns MITRE's CAPEC relates to CWE-131, as MITRE names them. Credits.
Ask an AI about CWE-131
Show the prompt
Explain CWE-131: Incorrect Calculation of Buffer Size and how to prevent and detect it in code. Use https://cwe.mitre.org/data/definitions/131.html and https://cve.bz/cve/cwe/131?via=ask-ai-copy for recent CVEs with this weakness. Cite the sources.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this weakness's id and public links.
By year: all 2026 2025 2024 2023 2022 2021
- 9.8CVE-2023-5941freebsdEPSS 1.3%
In versions of FreeBSD 12.4-RELEASE prior to 12.4-RELEASE-p7 and FreeBSD 13.2-RELEASE prior to 13.2-RELEASE-p5 the __sflush() stdio function in libc does not correctly update FILE objects' write space members for write-buffered streams whe…
- 7.5CVE-2023-45871EPSS 0.7%
An issue was discovered in drivers/net/ethernet/intel/igb/igb_main.c in the IGB driver in the Linux kernel before 6.5.3. A buffer size may not be adequate for frames larger than the MTU.
- 9.8CVE-2023-4257zephyrproject zephyrEPSS 1.1%
Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows.
- 4.4CVE-2023-20798google androidEPSS 0.1%
In pda, there is a possible out of bounds read due to an incorrect calculation of buffer size. This could lead to local information disclosure with System execution privileges needed. User interaction is not needed for exploitation. Patch …
- 8.8CVE-2023-36824EPSS 3.0%
Redis is an in-memory database that persists on disk. In Redit 7.0 prior to 7.0.12, extracting key names from a command and a list of arguments may, in some cases, trigger a heap overflow and result in reading random heap memory, heap corr…
- 7.5CVE-2023-30575apache guacamoleEPSS 1.1%
Apache Guacamole 1.5.1 and older may incorrectly calculate the lengths of instruction elements sent during the Guacamole protocol handshake, potentially allowing an attacker to inject Guacamole instructions during the handshake through spe…
- 3.3CVE-2023-2687silabs gecko software development kitEPSS 0.3%
Buffer overflow in Platform CLI component in Silicon Labs Gecko SDK v4.2.1 and earlier allows user to overwrite limited structures on the heap.
- 9.8CVE-2023-24819riot-os riotEPSS 1.4%
RIOT-OS, an operating system that supports Internet of Things devices, contains a network stack with the ability to process 6LoWPAN frames. Prior to version 2022.10, an attacker can send a crafted frame to the device resulting in an out of…
- 9.8CVE-2022-33211qualcommEPSS 0.6%
memory corruption in modem due to improper check while calculating size of serialized CoAP message
- 7.5CVE-2022-25731qualcommEPSS 0.4%
Information disclosure in modem due to buffer over-read while processing packets from DNS server
- 6.7CVE-2023-20627google androidEPSS 0.1%
In pqframework, there is a possible out of bounds write due to a missing bounds check. This could lead to local escalation of privilege with System execution privileges needed. User interaction is not needed for exploitation. Patch ID: ALP…
- 6.6CVE-2023-1175EPSS 0.5%
Incorrect Calculation of Buffer Size in GitHub repository vim/vim prior to 9.0.1378.
- 8.1CVE-2023-0568phpEPSS 1.1%
In PHP 8.0.X before 8.0.28, 8.1.X before 8.1.16 and 8.2.X before 8.2.3, core path resolution function allocate buffer one byte too small. When resolving paths with lengths close to system MAXPATHLEN setting, this may lead to the byte after…
- 7.8CVE-2022-4378linux kernelEPSS 0.4%
A stack overflow flaw was found in the Linux kernel's SYSCTL subsystem in how a user changes certain kernel parameters and variables. This flaw allows a local user to crash or potentially escalate their privileges on the system.
- 6.7CVE-2022-32651google androidEPSS 0.1%
In mtk-aie, there is a possible use after free due to a logic error. This could lead to local escalation of privilege with System execution privileges needed. User interaction is not needed for exploitation. Patch ID: ALPS07225857; Issue I…
- 6.7CVE-2022-32650google androidEPSS 0.1%
In mtk-isp, there is a possible use after free due to a logic error. This could lead to local escalation of privilege with System execution privileges needed. User interaction is not needed for exploitation. Patch ID: ALPS07225853; Issue I…
- 6.7CVE-2022-32649google androidEPSS 0.1%
In jpeg, there is a possible use after free due to a logic error. This could lead to local escalation of privilege with System execution privileges needed. User interaction is not needed for exploitation. Patch ID: ALPS07225840; Issue ID: …