OpenBSD ld.so LD_LIBRARY_PATH Local Privilege Escalation
CVE-2019-19726 is a local privilege escalation vulnerability in OpenBSD's dynamic loader (ld.so) affecting versions 6.6 and earlier. The flaw arises because setuid-root programs such as chpass and passwd do not properly clear the LD_LIBRARY_PATH environment variable when a very small RLIMIT_DATA resource limit is set. If ld.so fails to allocate memory while attempting to strip LD_LIBRARY_PATH, it silently fails, allowing the variable to persist. This enables a local attacker to load a malicious shared library as root, resulting in full root privilege escalation. The vulnerability is present in default OpenBSD installations and can be exploited without special privileges, requiring only local access and a writable directory.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
A local attacker can escalate privileges from any unprivileged user to root by exploiting setuid-root binaries (e.g., chpass, passwd) on affected OpenBSD systems. The attacker can execute arbitrary code as root by injecting a malicious shared library, leading to full system compromise. The vulnerability affects multiple OpenBSD versions (6.6, 6.5, 6.2, 6.1) and both amd64 and i386 architectures.
If you can’t patch tonight, do this now.
If immediate patching is not possible, restrict local access to trusted users only and monitor for suspicious activity. Avoid running untrusted code or granting shell access to untrusted users. Regularly audit setuid-root binaries and environment variable handling. However, full mitigation requires applying the official OpenBSD patch.
Patch, then assume compromise.
Apply the security patch released by OpenBSD developers (patch 013_ldso) for affected versions. The patch ensures that LD_LIBRARY_PATH is properly cleared in setuid-root programs, even when memory allocation fails. Users should update to the latest OpenBSD release or apply the relevant patch to mitigate the vulnerability.
1 exploit validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.