CVE-2009-4147 is a vulnerability in the _rtld function of the Run-Time Link-Editor (rtld) in FreeBSD 7.1 and 8.0, specifically in libexec/rtld-elf/rtld.c. The vulnerability arises because the rtld does not clear certain environment variables (LD_LIBMAP, LD_LIBRARY_PATH, LD_LIBMAP_DISABLE, LD_DEBUG, LD_ELF_HINTS_PATH) when executing setuid or setgid binaries. This oversight allows local users to manipulate these variables to influence the dynamic linker’s library search path, potentially loading malicious libraries and gaining elevated privileges.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).
This repository contains a single Metasploit module (modules/exploits/freebsd/local/rtld_execl_priv_esc.rb) that exploits a local privilege escalation vulnerability in the FreeBSD run-time link-editor (rtld), specifically due to improper handling of LD_* environment variables in the unsetenv() function (CVE-2009-4146, CVE-2009-4147). The exploit targets FreeBSD 7.2-RELEASE and 8.0-RELEASE (amd64) and requires access to a writable directory (default: /tmp), a setuid executable (default: /sbin/ping), and the presence of the 'cc' compiler. The module compiles and drops several C files to disk, abuses LD_PRELOAD to load a malicious shared object, and ultimately executes a payload (default: reverse TCP shell) as root. The structure is typical for a Metasploit local exploit, with Ruby code orchestrating the attack and generating/compiling C payloads on the fly. The main fingerprintable endpoints are the default SUID binary (/sbin/ping) and the writable directory (/tmp).
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
1 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.