CVE-2019-19726: OpenBSD ld.so LD_LIBRARY_PATH Local Privilege Escalation
- Vendor
- Openbsd
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.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
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.
Mitigation
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.
Remediation
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.
Exploits
1 exploit validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2019-19726 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2019-19726 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2019-19726?
- Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2019-19726, the earliest disclosed Dec 11, 2019.
- Is there a patch for CVE-2019-19726?
- 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.
- What products are affected by CVE-2019-19726?
- Openbsd.
- How severe is CVE-2019-19726?
- CVE-2019-19726 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 3.5% (89th percentile) as of Oct 16, 2026.
Recent activity
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.