cve.bz

CWE-131: Incorrect Calculation of Buffer Size, published in 2021

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 promptExplain 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

  1. 5.3CVE-2021-40526onepeloton ttr01 firmwareEPSS 1.0%

    Incorrect calculation of buffer size vulnerability in Peleton TTR01 up to and including PTV55G allows a remote attacker to trigger a Denial of Service attack through the GymKit daemon process by exploiting a heap overflow in the network se…

  2. 7.5CVE-2020-36475EPSS 1.9%

    An issue was discovered in Mbed TLS before 2.25.0 (and before 2.16.9 LTS and before 2.7.18 LTS). The calculations performed by mbedtls_mpi_exp_mod are not limited; thus, supplying overly large parameters could lead to denial of service whe…

  3. 7.5CVE-2021-22415huaweiEPSS 0.7%

    There is an Incorrect Calculation of Buffer Size Vulnerability in Huawei Smartphone.Successful exploitation of this vulnerability may cause kernel exceptions with the code.

  4. 7.5CVE-2021-22392huaweiEPSS 0.6%

    There is an Incorrect Calculation of Buffer Size in Huawei Smartphone.Successful exploitation of this vulnerability may cause verification bypass and directions to abnormal addresses.

  5. 7.5CVE-2021-22391huaweiEPSS 0.7%

    There is an Incorrect Calculation of Buffer Size in Huawei Smartphone.Successful exploitation of this vulnerability may cause the system to reset.

  6. 8.8CVE-2021-21793accusoft imagegearEPSS 1.1%

    An out-of-bounds write vulnerability exists in the JPG sof_nb_comp header processing functionality of Accusoft ImageGear 19.8 and 19.9. A specially crafted malformed file can lead to memory corruption. An attacker can provide a malicious f…

  7. 9.8CVE-2021-21824accusoft imagegearEPSS 1.2%

    An out-of-bounds write vulnerability exists in the JPG Handle_JPEG420 functionality of Accusoft ImageGear 19.9. A specially crafted malformed file can lead to memory corruption. An attacker can provide a malicious file to trigger this vuln…

  8. 7.8CVE-2020-11240qualcommEPSS 0.2%

    Memory corruption due to ioctl command size was incorrectly set to the size of a pointer and not enough storage is allocated for the copy of the user argument in Snapdragon Auto, Snapdragon Compute, Snapdragon Connectivity, Snapdragon Cons…

  9. 8.8CVE-2021-3491EPSS 0.6%

    The io_uring subsystem in the Linux kernel allowed the MAX_RW_COUNT limit to be bypassed in the PROVIDE_BUFFERS operation, which led to negative values being usedin mem_rw when reading /proc/<PID>/mem. This could be used to create a heap o…

  10. 7.8CVE-2021-29608google tensorflowEPSS 0.2%

    TensorFlow is an end-to-end open source platform for machine learning. Due to lack of validation in `tf.raw_ops.RaggedTensorToTensor`, an attacker can exploit an undefined behavior if input arguments are empty. The implementation(https://g…

  11. 5.5CVE-2021-29545google tensorflowEPSS 0.2%

    TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a denial of service via a `CHECK`-fail in converting sparse tensors to CSR Sparse matrices. This is because the implementation(https://github.co…

  12. 5.5CVE-2021-29542google tensorflowEPSS 0.2%

    TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a heap buffer overflow by passing crafted inputs to `tf.raw_ops.StringNGrams`. This is because the implementation(https://github.com/tensorflow/te…

  13. 7.8CVE-2021-29537google tensorflowEPSS 0.2%

    TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a heap buffer overflow in `QuantizedResizeBilinear` by passing in invalid thresholds for the quantization. This is because the implementation(http…

  14. 7.8CVE-2021-29536google tensorflowEPSS 0.2%

    TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a heap buffer overflow in `QuantizedReshape` by passing in invalid thresholds for the quantization. This is because the implementation(https://git…

  15. 7.8CVE-2021-29535google tensorflowEPSS 0.2%

    TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a heap buffer overflow in `QuantizedMul` by passing in invalid thresholds for the quantization. This is because the implementation(https://github.…

  16. 7.8CVE-2021-29529google tensorflowEPSS 0.3%

    TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a heap buffer overflow in `tf.raw_ops.QuantizedResizeBilinear` by manipulating input values so that float rounding results in off-by-one error i…

  17. 5.5CVE-2021-29521google tensorflowEPSS 0.2%

    TensorFlow is an end-to-end open source platform for machine learning. Specifying a negative dense shape in `tf.raw_ops.SparseCountSparseOutput` results in a segmentation fault being thrown out from the standard library as `std::vector` in…

  18. 9.8CVE-2021-0254juniper junosEPSS 2.7%

    A buffer size validation vulnerability in the overlayd service of Juniper Networks Junos OS may allow an unauthenticated remote attacker to send specially crafted packets to the device, triggering a partial Denial of Service (DoS) conditio…

  19. 8.8CVE-2021-21782accusoft imagegearEPSS 1.3%

    An out-of-bounds write vulnerability exists in the SGI format buffer size processing functionality of Accusoft ImageGear 19.8. A specially crafted malformed file can lead to memory corruption. An attacker can provide a malicious file to tr…

  20. 8.8CVE-2021-21776accusoft imagegearEPSS 1.4%

    An out-of-bounds write vulnerability exists in the SGI Format Buffer Size Processing functionality of Accusoft ImageGear 19.8. A specially crafted malformed file can lead to memory corruption. An attacker can provide a malicious file to tr…

  21. 7.8CVE-2021-21773accusoft imagegearEPSS 0.7%

    An out-of-bounds write vulnerability exists in the TIFF header count-processing functionality of Accusoft ImageGear 19.8. A specially crafted malformed file can lead to memory corruption. An attacker can provide a malicious file to trigger…

  22. 6.5CVE-2021-28039EPSS 0.4%

    An issue was discovered in the Linux kernel 5.9.x through 5.11.3, as used with Xen. In some less-common configurations, an x86 PV guest OS user can crash a Dom0 or driver domain via a large amount of I/O activity. The issue relates to misu…

  23. 9.8CVE-2021-27378rand core project rand coreEPSS 1.3%

    An issue was discovered in the rand_core crate before 0.6.2 for Rust. Because read_u32_into and read_u64_into mishandle certain buffer-length checks, a random number generator may be seeded with too little data.

  24. 8.8CVE-2020-13585accusoft imagegearEPSS 1.9%

    An out-of-bounds write vulnerability exists in the PSD Header processing functionality of Accusoft ImageGear 19.8. A specially crafted malformed file can lead to code execution. An attacker can provide a malicious file to trigger this vuln…

  25. 7.8CVE-2020-13546softmaker office textmaker 2021EPSS 1.4%

    In SoftMaker Software GmbH SoftMaker Office TextMaker 2021 (revision 1014), a specially crafted document can cause the document parser to miscalculate a length used to allocate a buffer, later upon usage of this buffer the application will…