CVE-2019-19726
HIGHOpenBSD Dynamic Loader chpass Privilege Escalation
Title source: metasploitExploitation Summary
EIP tracks 3 public exploits for CVE-2019-19726.
PoCs published by Metasploit, Qualys Corporation, Qualys, bcoles, including Metasploit module exploits/openbsd/local/dynamic_loader_chpass_privesc.
AI-analyzed exploit summary This Metasploit module exploits CVE-2019-19726, a vulnerability in OpenBSD's dynamic loader (`ld.so`) where `LD_LIBRARY_PATH` is not properly reset when set with approximately `ARG_MAX` colons. This allows loading `libutil.so` from an untrusted path via the `chpass` set-uid executable, leading to privileged code execution.
Description
OpenBSD through 6.6 allows local users to escalate to root because a check for LD_LIBRARY_PATH in setuid programs can be defeated by setting a very small RLIMIT_DATA resource limit. When executing chpass or passwd (which are setuid root), _dl_setup_env in ld.so tries to strip LD_LIBRARY_PATH from the environment, but fails when it cannot allocate memory. Thus, the attacker is able to execute their own library code as root.
Exploits (3)
This Metasploit module exploits CVE-2019-19726, a vulnerability in OpenBSD's dynamic loader (`ld.so`) where `LD_LIBRARY_PATH` is not properly reset when set with approximately `ARG_MAX` colons. This allows loading `libutil.so` from an untrusted path via the `chpass` set-uid executable, leading to privileged code execution.
This exploit leverages a vulnerability in OpenBSD's dynamic loader (ld.so) to escalate privileges via a set-user-ID executable (e.g., chpass or passwd). It manipulates LD_LIBRARY_PATH and RLIMIT_DATA to bypass security checks and load a malicious shared library, resulting in root access.
This Metasploit module exploits CVE-2019-19726, a vulnerability in OpenBSD's dynamic loader (`ld.so`) where `LD_LIBRARY_PATH` is not properly reset when set with approximately `ARG_MAX` colons. It abuses the `chpass` set-uid executable to load a malicious `libutil.so` from an untrusted path, achieving local privilege escalation.
References (9)
Scores
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H