What’s Vulnerable › Vulnerabilities
CVE-2023-5941: libc stdio buffer overflow
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.1% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-11-08 · updated 2026-06-17
- Weakness: CWE-131
Description
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 when the write(2) system call returns an error. Depending on the nature of an application that calls libc's stdio functions and the presence of errors returned from the write(2) system call (or an overridden stdio write routine) a heap buffer overflow may occur. Such overflows may lead to data corruption or the execution of arbitrary code at the privilege level of the calling program.
Affected products
- FreeBSD: before 12.4; from 13.0 before 13.2; 12.4, 12.4-p1, 12.4-p2, 12.4-p3, 12.4-p4, 12.4-p5 (+8) — fixed in 12.4, 13.2
How to fix
Upgrade to a fixed version: FreeBSD 12.4, 13.2. Check the vendor advisory for mitigations.
References
- https://security.freebsd.org/advisories/FreeBSD-SA-23:15.stdio.asc
- https://security.netapp.com/advisory/ntap-20231214-0004/
- https://security.freebsd.org/advisories/FreeBSD-SA-23:15.stdio.asc
- https://security.netapp.com/advisory/ntap-20231214-0004/
Get alerted when CVE-2023-5941 or the next vulnerability affects your stack