Exploit database

Vulnerability

CVE-2019-19726

Vulnerability details

Score
7.8
Severity
high

CVSS 3.1 · NVD

Vector string

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

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.

CVE Program

Exploit source choices

5 sources
OpenBSD Dynamic Loader chpass Privilege Escalation
MSF-openbsd--local--dynamic_loader_chpass_privescMetasploitBSD,Unix / remote

This module exploits a vulnerability in the OpenBSD `ld.so` dynamic loader (CVE-2019-19726). The `_dl_getenv()` function fails to reset the `LD_LIBRARY_PATH` environment variable when set with approximately `ARG_MAX` colons. This can be abused to load `libutil.so` from an untrusted path, using `LD_LIBRARY_PATH` in combination with the `chpass` set-uid executable, resulting in privileged code execution. This module has been tested successfully on: OpenBSD 6.1 (amd64); and OpenBSD 6.6 (amd64)

2019-12-11dynamic_loader_chpass_privesc.rb
bcoles/local-exploits
GH-47f39e1014631a8b394d5d92ffe7cc6fGitHubUnofficial GitHub source

Various local exploits

2018-12-3018 files · 150 stars
anoaghost/localroot_compile
GH-cb529ec43040e49cb46c85b183cdcf81GitHubUnofficial GitHub source

Localroot Compile

2019-08-0178 files · 23 stars