Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2002-0572: FreeBSD stdio File Descriptor Reuse Privilege Escalation

Published Jun 11, 2002 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS7.2High · v2
EPSS1.6%76th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendors
FreebsdOpenbsdSun
IdentifiersCVE-2002-0572CWE-403

CVE-2002-0572 is a local privilege escalation vulnerability affecting FreeBSD 4.5 and earlier, and possibly other BSD-derived operating systems. The issue arises when a local user closes one or more of the standard file descriptors 0, 1, or 2 (stdin, stdout, stderr) before invoking a setuid program. If the called setuid process does not safely re-open or validate these descriptors, the kernel may reuse them for subsequent file opens performed by the privileged process. As a result, I/O operations that the setuid program intended to direct to benign files or standard streams can instead be redirected to attacker-chosen files, enabling unauthorized reads from or writes to otherwise restricted files. In affected scenarios, this descriptor reuse can be leveraged to obtain elevated privileges, including root.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows a local attacker to interfere with file operations performed by a setuid-root process, leading to unauthorized access to restricted files and potentially arbitrary modification of privileged resources. In practice, this can result in local privilege escalation to root and full compromise of the affected host.

Mitigation

If you can’t patch tonight, do this now.

Until patches can be applied, restrict local shell access to trusted users only, minimize the presence and use of setuid-root binaries, and monitor for suspicious local activity indicative of privilege-escalation attempts. Additional hardening of privileged programs to explicitly open or validate stdin, stdout, and stderr before use can reduce exposure.

Remediation

Patch, then assume compromise.

Apply the vendor patch referenced in FreeBSD Security Advisory FreeBSD-SA-02:23.stdio. Systems running FreeBSD 4.5 and earlier should be updated to a corrected version or patched according to the advisory guidance. Where applicable, review and harden setuid programs so they do not assume file descriptors 0, 1, and 2 are always valid and safely bound.

Public exploits

Exploits

No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
Candidate exploits are awaiting analysis. View them in Mallory.
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
FreebsdFreebsdoperating_system
OpenbsdOpenbsdoperating_system
SunSolarisoperating_system
SunSunosoperating_system
FAQ

Frequently asked questions

Is CVE-2002-0572 exploited in the wild?
As of Oct 16, 2026, Mallory has no reports of CVE-2002-0572 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2002-0572?
Yes. As of Oct 16, 2026, Mallory has reports of a public exploit for CVE-2002-0572.
Is there a patch for CVE-2002-0572?
Apply the vendor patch referenced in FreeBSD Security Advisory FreeBSD-SA-02:23.stdio. Systems running FreeBSD 4.5 and earlier should be updated to a corrected version or patched according to the advisory guidance.
What products are affected by CVE-2002-0572?
Freebsd, Openbsd, Sun Solaris, and Sunos.
How severe is CVE-2002-0572?
CVE-2002-0572 has a CVSS v2 score of 7.2 (High) and an EPSS score of 1.6% (76th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

1 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.

View more in app →

No news coverage yet. Advisories and community discussion only.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.