BreachSpiderVerified, not vibes

CVE-2009-4146 in Freebsd

High 7.2 Public exploit reported

The _rtld function in the Run-Time Link-Editor (rtld) in libexec/rtld-elf/rtld.c in FreeBSD 7.1, 7.2, and 8.0 does not clear the LD_PRELOAD environment variable, which allows local users to gain privileges by executing a setuid or setguid program with a modified LD_PRELOAD variable containing an untrusted search pat...

Affects 1 product from 1 vendor. Facts below cite their sources.

CVSS 2.07.2
EPSS3.9%
EPSS percentile91th
FixUnknown

Requires local access, low complexity.

Affected products and versions

VendorProductAffected versions
Freebsd Freebsd 7.1 7.2 8.0

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Vendor PSIRT: [email protected]

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitReported · reference

Official description

The _rtld function in the Run-Time Link-Editor (rtld) in libexec/rtld-elf/rtld.c in FreeBSD 7.1, 7.2, and 8.0 does not clear the LD_PRELOAD environment variable, which allows local users to gain privileges by executing a setuid or setguid program with a modified LD_PRELOAD variable containing an untrusted search path that points to a Trojan horse library, a different vector than CVE-2009-4147.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2009-4146
BreachSpider IDBS-2009-GLOBAL-156165-H
CVSS vectorAV:L/AC:L/Au:N/C:C/I:C/A:C
Published2009-12-02
Last modified2026-06-16
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-264: Permissions, Privileges, and Access Controls

Broad class covering failures in permission enforcement. Deprecated in favor of CWE-284, CWE-862, CWE-863.

Analysis AI-written, not human-reviewed

The _rtld function in the Run-Time Link-Editor (rtld) in FreeBSD 7.1, 7.2, and 8.0 does not clear the LD_PRELOAD environment variable, allowing local users to gain privileges by executing a setuid or setguid program with a modified LD_PRELOAD variable pointing to a malicious library.

Local users can exploit this vulnerability by setting the LD_PRELOAD environment variable to point to a malicious shared library before executing a setuid or setgid program. This allows the malicious library to be loaded with the elevated privileges of the target program.

Questions

What is CVE-2009-4146?

The _rtld function in the Run-Time Link-Editor (rtld) in FreeBSD 7.1, 7.2, and 8.0 does not clear the LD_PRELOAD environment variable, allowing local users to gain privileges by executing a setuid or setguid program with a modified LD_PRELOAD variable pointing to a malicious library.

What is the CVSS score for CVE-2009-4146?

CVE-2009-4146 has CVSS 7.2 (High). Vector: AV:L/AC:L/Au:N/C:C/I:C/A:C. EPSS: 3.9%.

Is CVE-2009-4146 actively exploited?

Public exploit available for CVE-2009-4146. Exploitation risk elevated.

How do I remediate CVE-2009-4146?

Priority: HIGH. PSIRT: [email protected]

What systems are affected by CVE-2009-4146?

CVE-2009-4146 affects Freebsd Freebsd.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Freebsd","product":"Freebsd","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-16.