Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate to local FreeBSD system
-
DeliveryOpen 1000+ file descriptors
-
ExploitExecute setuid-root libnv application
-
InstallTrigger select(2) with FD >1024
-
C2Overflow stack with crafted data
-
ExecuteHijack control flow
-
ImpactExecute arbitrary code as root
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Stack buffer bounds checking
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three specific conditions: First, target application must be running with setuid-root permissions (or other elevated privileges worth escalating to) AND use the libnv library for socket-based IPC operations. Second, attacker must force the target process to obtain socket file descriptors with numbers ≥1024, typically by pre-exhausting lower descriptor numbers through descriptor leaking (opening files/sockets before exec) or exploiting the target's failure to close inherited descriptors. Third, attacker needs local authenticated shell access (PR:L) on the FreeBSD system to manipulate file descriptors and execute the target binary. Exploitation is limited to FreeBSD systems running vulnerable versions (13.5 <p13, 14.3 <p12, 14.4 <p3, 15.0 <p7) and becomes impractical on systems with few setuid-root binaries, strict resource limits preventing descriptor exhaustion, or capability-mode restrictions on IPC. Remote exploitation is not possible (AV:L constraint) and no user interaction is required once conditions are established. |
| Impact | Real-world risk is moderate despite the high CVSS 7.8 score. The CVSS vector (AV:L/AC:L/PR:L/UI:N) correctly indicates local access with low-privileged authentication required and low attack complexity once conditions are met. However, exploitation prerequisites significantly constrain practical impact: attackers must identify setuid-root binaries that use libnv AND successfully exhaust file descriptors in those specific processes. The EPSS score of 0.02% (5th percentile) reflects that this vulnerability class requires precise targeting and is not broadly automatable across diverse environments. No CISA KEV listing indicates no confirmed active exploitation. The absence of public POC further reduces immediate risk. Primary risk exists in multi-user FreeBSD environments with untrusted local users where setuid-root programs use libnv for IPC, particularly older versions of privilege-separated services. Organizations running single-user FreeBSD systems or containerized workloads with minimal setuid binaries face lower practical risk. Patching priority should be high for multi-tenant shell servers and medium for other deployments, balancing the theoretical severity against constrained exploitation conditions and low observed threat activity. |
| Exploit ScenarioDerived | An unprivileged local attacker on a multi-user FreeBSD system identifies a setuid-root utility that uses libnv for IPC (such as a capability-mode service broker). The attacker opens 1000+ file descriptors in their own shell session, then executes the target setuid binary which inherits the high file descriptor numbers due to incomplete cleanup during exec. When the setuid program's libnv code attempts socket communication and calls select(2) with a descriptor >1024, FD_SET writes beyond stack bounds, corrupting return addresses or function pointers. The attacker crafts the overflow to redirect execution to injected shellcode or ROP chain, gaining root privileges. No public POC exists currently, but the attack technique is well-understood for select(2) vulnerabilities. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 30, 2026
Stack corruption in FreeBSD libnv library allows local authenticated attackers to elevate privileges to root when exploiting setuid-root applications. The vulnerability stems from libnv's select(2) implementation failing to validate socket descriptors against FD_SETSIZE limits (1024), enabling descriptor exhaustion attacks that corrupt stack memory. Confirmed by FreeBSD Security Advisory SA-26:16 with patches available across all stable branches. EPSS score of 0.02% indicates low observed exploitation probability, and no active exploitation or public POC identified at time of analysis.
RemediationAI
Apply vendor-released patches immediately via freebsd-update: FreeBSD 15.0 users upgrade to 15.0-RELEASE-p7, FreeBSD 14.4 to 14.4-RELEASE-p3, FreeBSD 14.3 to 14.3-RELEASE-p12, and FreeBSD 13.5 to 13.5-RELEASE-p13. Run 'freebsd-update fetch install' followed by system reboot to ensure patched libnv library is loaded by all processes. Source-based installations should sync to the appropriate stable branch (stable/15, stable/14, stable/13) and rebuild world per FreeBSD handbook procedures. If immediate patching is infeasible, implement compensating controls: audit and remove unnecessary setuid-root bits from binaries using 'find / -perm -4000 -user root' and apply least-privilege principles; configure resource limits via login.conf to restrict maxproc and openfiles for untrusted users, reducing file descriptor exhaustion attack surface (trade-off: may impact legitimate workloads requiring many descriptors); enable and monitor MAC framework policies (mac_bsdextended) to restrict local user interactions with privileged processes. These mitigations reduce but do not eliminate risk as they depend on correct identification of attack-exposed setuid binaries. Complete advisory with technical details and patch information at https://security.freebsd.org/advisories/FreeBSD-SA-26:16.libnv.asc.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The libnv library in FreeBSD provides a name-value pair serialization mechanism used for IPC and capability mode communication. The vulnerability resides in libnv's socket data exchange routines that use select(2) for I/O multiplexing. The select(2) system call uses a fixed-size bitmap (fd_set) with a hardcoded limit of FD_SETSIZE (1024 descriptors on FreeBSD). When libnv passes a file descriptor number ≥1024 to FD_SET() without validation, it writes beyond the fd_set structure's bounds, corrupting adjacent stack memory. This is a classic CWE-121 stack-based buffer overflow. The attack vector requires forcing target applications to exhaust low-numbered file descriptors, pushing newly opened sockets into the >1024 range. Applications using libnv for privilege separation or running with setuid-root bits become privilege escalation targets. The CPE identifier cpe:2.3:a:freebsd:freebsd confirms this affects the core FreeBSD operating system distribution across multiple release branches.
Know when Freebsd gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (freebsd) · only source for this CVE.
CVSS VectorVendor: freebsd
Lifecycle Timeline
2DescriptionCVE.org
When exchanging data over a socket, libnv uses select(2) to wait for data to arrive. However, it does not verify whether the provided socket descriptor fits in select(2)'s file descriptor set size limit of FD_SETSIZE (1024).
An attacker who is able to force a libnv application to allocate large file descriptors, e.g., by opening many descriptors and executing a program which is not careful to close them upon startup, can trigger stack corruption. If the target application is setuid-root, then this could be used to elevate local privileges.
Executive ViewAI
CVE-2026-39457 is a privilege escalation vulnerability in FreeBSD's libnv library that allows authenticated local users to gain root access through setuid-root applications. This affects FreeBSD systems where users have local shell access, potentially compromising system integrity across affected infrastructure. Organizations running FreeBSD should prioritize patching to prevent unauthorized privilege escalation.
Vendor-released patch: FreeBSD Security Advisory SA-26:16 (apply across all stable branches). Until patching is complete, restrict local shell account access and monitor setuid-root application execution via audit logs or process monitoring.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.
The x86-64 kernel system-call functionality in Xen 4.1.2 and earlier, as used in Citrix XenServer 6.0.2 and earlier and
The rtsol(8) and rtsold(8) programs do not validate the domain search list options provided in router advertisement mess
Server or client applications that call the SSL_check_chain() function during or after a TLS 1.3 handshake may crash due
The RFC 5011 implementation in rdata.c in ISC BIND 9.7.x and 9.8.x before 9.8.5-P2, 9.8.6b1, 9.9.x before 9.9.3-P2, and
Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to
An issue was discovered in OpenSSH 7.9. Rated medium severity (CVSS 5.9), this vulnerability is remotely exploitable, no
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot
The vm_map_lookup function in sys/vm/vm_map.c in the mmap implementation in the kernel in FreeBSD 9.0 through 9.1-RELEAS
An OpenSSL TLS server may crash if sent a maliciously crafted renegotiation ClientHello message from a client. Rated med
Integer overflow in the _gd2GetHeader function in gd_gd2.c in the GD Graphics Library (aka libgd) before 2.2.3, as used
The Stream Control Transmission Protocol (SCTP) module in FreeBSD 9.3 before p33, 10.1 before p26, and 10.2 before p9, w
In FreeBSD 12.1-STABLE before r359565, 12.1-RELEASE before p7, 11.4-STABLE before r362975, 11.4-RELEASE before p1, and 1
EUVD-2026-26356
NVD
CVE.org
EPSS
Vulnrichment
VulDB
GitHub PoC
Exploit-DB