CVE-2023-5941
CVE-2023-5941 is a critical-severity vulnerability in Freebsd with a CVSS 3.x base score of 9.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-131.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- EPSS exploit prediction: 1% (61st percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-131
- Affected product: Freebsd
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2023-5941?
- 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.
- How severe is CVE-2023-5941?
- CVE-2023-5941 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2023-5941 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (61st percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2023-5941?
- CVE-2023-5941 primarily affects Freebsd. In total, 15 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2023-5941?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- When was CVE-2023-5941 published?
- CVE-2023-5941 was published on 2023-11-08 and last updated on 2026-06-17.
References
- https://security.freebsd.org/advisories/FreeBSD-SA-23:15.stdio.asc
- https://security.netapp.com/advisory/ntap-20231214-0004/
Affected products (15)
- cpe:2.3:o:freebsd:freebsd:*:*:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:12.4:-:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:12.4:p1:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:12.4:p2:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:12.4:p3:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:12.4:p4:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:12.4:p5:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:12.4:p6:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:12.4:rc2-p1:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:12.4:rc2-p2:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:13.2:-:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:13.2:p1:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:13.2:p2:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:13.2:p3:*:*:*:*:*:*
- cpe:2.3:o:freebsd:freebsd:13.2:p4:*:*:*:*:*:*
More vulnerabilities in Freebsd
- CVE-2024-43102 — Critical (CVSS 10.0): Concurrent removals of certain anonymous shared memory mappings by using the UMTX_SHM_DESTROY sub-request of…
- CVE-2018-17160 — Critical (CVSS 10.0): In FreeBSD before 11.2-STABLE(r341486) and 11.2-RELEASE-p6, insufficient bounds checking in one of the device models…
- CVE-2014-3954 — Critical (CVSS 10.0): Stack-based buffer overflow in rtsold in FreeBSD 9.1 through 10.1-RC2 allows remote attackers to cause a denial of…
- CVE-2011-4862 — Critical (CVSS 10.0): Buffer overflow in libtelnet/encrypt.c in telnetd in FreeBSD 7.3 through 9.0, MIT Kerberos Version 5 Applications (aka…
- CVE-2006-4304 — Critical (CVSS 10.0): Buffer overflow in the sppp driver in FreeBSD 4.11 through 6.1, NetBSD 2.0 through 4.0 beta before 20060823, and…
- CVE-2006-0226 — Critical (CVSS 10.0): Integer overflow in IEEE 802.11 network subsystem (ieee80211_ioctl.c) in FreeBSD before 6.0-STABLE, while scanning for…
Other CWE-131 (Incorrect Calculation of Buffer Size) vulnerabilities
- CVE-2026-52955 — Critical (CVSS 9.8): In the Linux kernel, the following vulnerability has been resolved: libceph: Fix potential out-of-bounds access in…
- CVE-2026-41676 — Critical (CVSS 9.8): rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.9.27 to before 0.10.78,…
- CVE-2026-1949 — Critical (CVSS 9.8): Delta Electronics AS320T has incorrect calculation of the buffer size on the stack in the GET/PUT request handler of…
- CVE-2026-20911 — Critical (CVSS 9.8): A heap-based buffer overflow vulnerability exists in the HuffTable::initval functionality of LibRaw Commit 0b56545 and…
- CVE-2025-1861 — Critical (CVSS 9.8): In PHP from 8.1.* before 8.1.32, from 8.2.* before 8.2.28, from 8.3.* before 8.3.19, from 8.4.* before 8.4.5, when…
- CVE-2022-33211 — Critical (CVSS 9.8): memory corruption in modem due to improper check while calculating size of serialized CoAP message
Browse all CWE-131 (Incorrect Calculation of Buffer Size) vulnerabilities →