CWE-131: Incorrect Calculation of Buffer Size
The product does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow.
Last updated
Overview
CWE-131 (Incorrect Calculation of Buffer Size) is a base-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Real-world CVEs
103 recorded CVEs are caused by CWE-131 (Incorrect Calculation of Buffer Size), including 1 in CISA's KEV (Known Exploited Vulnerabilities) catalog. KEVs are shown first. 17 new CWE-131 CVEs have been recorded so far in 2026 (17 in 2025).