CWE-590: Free of Memory not on the Heap, published in 2022
Filter
The product calls free() on a pointer to memory that was not allocated using associated heap allocation functions such as malloc(), calloc(), or realloc().
What the weakness is: CWE-590 at MITRE. All weaknesses
Ask an AI about CWE-590
Show the prompt
Explain CWE-590: Free of Memory not on the Heap and how to prevent and detect it in code. Use https://cwe.mitre.org/data/definitions/590.html and https://cve.bz/cve/cwe/590?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-2022-31627phpEPSS 2.3%
In PHP versions 8.1.x below 8.1.8, when fileinfo functions, such as finfo_buffer, due to incorrect patch applied to the third party code from libmagic, incorrect function may be used to free allocated memory, which may lead to heap corrupt…
- 8.1CVE-2022-31625EPSS 2.8%
In PHP versions 7.4.x below 7.4.30, 8.0.x below 8.0.20, and 8.1.x below 8.1.7, when using Postgres database extension, supplying invalid parameters to the parametrized query may lead to PHP attempting to free memory using uninitialized dat…