Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain local shell on FreeBSD host
-
DeliveryRaise descriptor limit and open >1024 fds
-
ExploitExec setuid-root libcasper binary
-
Executionlibcasper writes oversized fd into stack fd_set
-
PersistStack frame corruption hijacks control flow
-
ImpactExecute shellcode 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 local shell or code-execution access on the FreeBSD host (CVSS AV:L, PR:L), the ability to open enough file descriptors to push libcasper's socket fd above the FD_SETSIZE limit of 1024 (typically requires a permissive RLIMIT_NOFILE - default 1024 soft / higher hard limit on FreeBSD), and the presence of a reachable setuid-root binary that links against libcasper(3) and does not aggressively close inherited descriptors at startup. The attack is limited by: no network reachability (AV:L rules out remote exploitation), the need for a setuid-root libcasper consumer to be installed and executable by the attacker, and the need to win descriptor-layout determinism to achieve reliable stack corruption rather than a crash. Systems with kern.maxfilesperproc or per-user descriptor limits set below 1024 are not exploitable. |
| Impact | CVSS 8.8 is driven by Scope:Changed and full C/I/A impact reflecting root compromise, but the attack vector is Local (AV:L) with low-privilege prerequisites (PR:L) - exploitation requires an existing local foothold, which materially limits real-world exposure. EPSS at 0.02% (5th percentile) and CISA SSVC reporting Exploitation:none, Automatable:no, Technical Impact:partial all point to a non-urgent posture for internet-exposed services, but for multi-user FreeBSD systems (shell hosts, shared build infrastructure, jails with local accounts) this should be treated as high priority because any setuid-root binary using libcasper becomes a privilege-escalation primitive. The signals are internally consistent: high CVSS reflects severe impact-if-exploited while low EPSS/SSVC reflect the local-access barrier and absence of weaponization. No known KEV listing and no public exploit identified at time of analysis. |
| Exploit ScenarioDerived | A local user with shell access on a multi-user FreeBSD host opens more than 1024 file descriptors (e.g., via ulimit-raised socket or pipe creation) and then execs a setuid-root binary that uses libcasper without sanitizing the inherited descriptor table. When libcasper opens its helper socket, the kernel assigns a file descriptor >= 1024, and the subsequent select(2) call overflows the on-stack fd_set, corrupting the return address or saved registers. The attacker shapes the descriptor allocation to control the corrupted bytes and gains a root shell. No public exploit identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 21, 2026
Local privilege escalation in FreeBSD's libcasper(3) library affects FreeBSD 14.3, 14.4, and 15.0 releases prior to specified patch levels, where a missing FD_SETSIZE bounds check enables stack corruption when a low-privileged attacker forces a setuid-root application to allocate file descriptors above 1024. Successful exploitation yields root-equivalent privileges on the local host. No public exploit identified at time of analysis and EPSS scores exploitation probability at just 0.02%, but the issue is confirmed by a FreeBSD security advisory (SA-26:22.libcasper).
RemediationAI
Vendor-released patch: apply the FreeBSD base-system updates to reach FreeBSD 15.0-RELEASE-p9, 14.4-RELEASE-p5, or 14.3-RELEASE-p14 as appropriate, using freebsd-update fetch install followed by a reboot or at minimum restart of all setuid-root services that link libcasper. The authoritative advisory at https://security.freebsd.org/advisories/FreeBSD-SA-26:22.libcasper.asc provides the patch and source-tree commits. If patching is delayed, compensating controls include lowering the per-process file-descriptor limit via login.conf or sysctl (kern.maxfilesperproc) to a value safely below 1024 so attackers cannot force allocation above FD_SETSIZE - note this can break workloads that legitimately open many descriptors (database servers, network proxies). Auditing and temporarily removing the setuid bit from non-essential libcasper-linked binaries also blocks the privilege-escalation path at the cost of disabling those tools for unprivileged users.
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
libcasper(3) is FreeBSD's Capsicum-based privilege-separation framework that splits applications into a sandboxed main process and helper services communicating over UNIX domain sockets. The library uses the legacy select(2) syscall, whose fd_set bitmap is sized by the compile-time FD_SETSIZE constant (1024 on FreeBSD). When libcasper writes the socket file descriptor into the fd_set without first verifying fd < FD_SETSIZE, descriptor values >= 1024 cause writes past the bitmap's allocated bounds. This is a textbook CWE-121 stack-based buffer overflow, since the fd_set is typically declared as a stack-resident structure. The affected CPE is cpe:2.3:a:freebsd:freebsd, and any setuid-root binary linked against libcasper inherits the flaw.
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:C/C:H/I:H/A:H
Primary rating from Vendor (freebsd) · only source for this CVE.
CVSS VectorVendor: freebsd
Lifecycle Timeline
3DescriptionCVE.org
libcasper(3) communicates with helper processes via UNIX domain sockets, and uses the select(2) system call to wait for data to become available. However, it does not verify that its socket descriptor fits within select(2)'s descriptor set size limit of FD_SETSIZE (1024).
An attacker able to cause an application using libcasper(3) to allocate large file descriptors, e.g., by opening many descriptors and executing a program which is not careful to close them upon startup, may trigger stack corruption. If the target application runs with setuid root privileges, this could be used to escalate local privileges.
Executive ViewAI
FreeBSD systems running libcasper in versions 14.3, 14.4, and 15.0 face a local privilege escalation vulnerability that can allow low-privileged attackers to gain root-equivalent access. This affects any organization using FreeBSD infrastructure and represents a critical exposure requiring immediate inventory and mitigation planning. While current exploitation likelihood is minimal, the severity of impact-complete system compromise-demands urgent action.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Enforce file descriptor limits via system configuration and setrlimit controls to prevent FD allocation above 1024; (2) Disable or remove unnecessary setuid-root applications; (3) Apply principle of least privilege to local user accounts; (4) Deploy system call tracing and monitoring to detect abnormal file descriptor allocation patterns; (5) Implement network isolation of critical FreeBSD systems where operationally feasible.
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-31258
GHSA-pwph-948j-pgvj
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB