CVE-2026-57589: Use-After-Free in OpenBSD semget() Leads to Local Privilege Escalation
A use-after-free vulnerability exists in OpenBSD's System V semaphore implementation that allows a local attacker with no special privileges to escalate to root access. The flaw occurs when a process calls semget() and enters a sleep state; under specific timing conditions during context switching, freed memory can be accessed, compromising system integrity. This is a local attack requiring code execution on the target system but no prior privileges.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.4 HIGH · CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-416
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-25 / 2026-07-10
NVD description (verbatim)
sys/kern/sysv_sem.c in OpenBSD through 7.9 has a use-after-free allowing local privilege escalation to root. This is a context switch use-after-free after tsleep in sys_semget().
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-57589 is a use-after-free vulnerability in sys/kern/sysv_sem.c affecting OpenBSD through version 7.9. The vulnerability manifests in sys_semget() where a tsleep() call creates a window for a race condition. When a process is context-switched while asleep, the underlying memory structures can be freed and reallocated before the sleeping process resumes execution, leading to a double-free or access-after-free scenario. Exploitation results in arbitrary code execution with kernel privileges. The vulnerability is classified under CWE-416 (Use After Free).
Business impact
This vulnerability poses a critical risk to OpenBSD deployments, particularly multi-user systems or those running untrusted code. Any local user can escalate to root without authentication, enabling complete system compromise including data theft, malware installation, and lateral movement. Organizations relying on OpenBSD for security-critical infrastructure should treat this as an immediate threat requiring emergency patching.
Affected systems
OpenBSD versions up to and including 7.9 are affected. This includes all installations running 7.9 or earlier. Systems with local user accounts or services that can be exploited to gain code execution are at risk. Embedded OpenBSD deployments and systems with multiple tenant isolation requirements should be prioritized for remediation.
Exploitability
Exploitation requires local code execution but no prior privileges (PR:N), making it accessible to any user account on the system. The attack complexity is rated high (AC:H), suggesting reliable exploitation requires specific timing or system conditions to be met. However, the use-after-free class of vulnerabilities historically becomes more exploitable over time as attackers refine techniques. This is not remotely exploitable and does not require user interaction.
Remediation
Apply security updates from OpenBSD immediately upon availability. Organizations should monitor the OpenBSD security advisories page and errata information for patched versions. Until patches are available, restrict local access through process isolation, disable unnecessary services, and implement strict access controls on semaphore operations if possible through mandatory access control policies.
Patch guidance
Monitor OpenBSD's official security channels and the errata section of their website for release announcements. Patches will likely be delivered as part of errata updates or point releases. Verify the patch version against the official OpenBSD advisory before deployment. Test patches in a non-production environment first given the low-level kernel nature of the fix.
Detection guidance
Monitor system logs for unusual semget() calls or repeated failures in semaphore operations. Watch for suspicious context-switching patterns or processes attempting rapid semaphore creation and deletion. Endpoint detection and response (EDR) tools should monitor privilege escalation events, particularly those following semaphore-related syscalls. Kernel-level monitoring of use-after-free conditions may require custom kernel instrumentation or specialized tools.
Why prioritize this
This vulnerability merits immediate prioritization due to its combination of high CVSS score (7.4), complete integrity and confidentiality impact (I:H, C:H), and the ease of local privilege escalation on multi-user systems. The lack of authentication requirements and the direct path to root access make this a tier-one remediation target for any OpenBSD environment.
Risk score, explained
CVSS 3.1 score of 7.4 reflects high severity: local attack vector (AV:L), high attack complexity (AC:H), no privilege or user interaction required (PR:N, UI:N), unchanged scope (S:U), and complete impact across confidentiality, integrity, and availability (C:H, I:H, A:H). The high complexity rating acknowledges the timing-dependent nature of the race condition, but the impact potential justifies the HIGH severity classification.
Frequently asked questions
Can this vulnerability be exploited remotely?
No. CVE-2026-57589 requires local code execution on the target system. Remote exploitation is not possible without first establishing local access through a separate vulnerability or valid credentials.
Do I need to have administrator privileges to exploit this?
No. The vulnerability has no privilege requirement (PR:N), meaning any local user account on an affected OpenBSD system can attempt exploitation.
What versions of OpenBSD are affected?
OpenBSD through version 7.9 is affected by this vulnerability. You should verify the exact affected range against the official OpenBSD security advisory for your specific release.
Is there a workaround if I cannot patch immediately?
There is no complete workaround. Mitigation strategies include restricting local user access, disabling unnecessary services, implementing strict access controls, and considering process isolation techniques. However, patching remains the only reliable remediation.
This analysis is based on publicly available vulnerability data as of the publication date. CVSS scores and severity ratings are as provided by the vulnerability source. Exploit details and proof-of-concept code are not provided. Organizations should verify patch availability and compatibility with their specific OpenBSD versions against official OpenBSD security advisories before deploying patches. This information is provided for defensive security purposes only. Source: NVD (public-domain), retrieved 2026-08-02. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2025-60467HIGHGPAC MP4Box Use-After-Free DoS Vulnerability
- CVE-2026-0125HIGHAndroid VPU Race Condition Local Privilege Escalation
- CVE-2026-0137HIGHAndroid Edge TPU Use-After-Free Privilege Escalation
- CVE-2026-0143HIGHAndroid LWIS Use-After-Free Privilege Escalation (CVSS 7.8 HIGH)
- CVE-2026-10000HIGHChrome Sandbox Escape via Use-After-Free in Password Handling
- CVE-2026-10001HIGHChrome Sandbox Escape via PerformanceManager Use-After-Free
- CVE-2026-10002HIGHGoogle Chrome PDFium Use-After-Free Vulnerability (CVSS 8.8)
- CVE-2026-10003HIGHChrome Use-After-Free Code Execution Vulnerability Analysis