Skip to main content
Mallory
High

Local Privilege Escalation in Apple OS X rsh remote_cmds via Environment Variables

IdentifiersCVE-2015-5889CWE-269

CVE-2015-5889 is a local privilege escalation vulnerability in the rsh program within the remote_cmds component of Apple OS X before 10.11. The issue allows a local user to obtain root privileges through crafted use of environment variables. Public exploit material referenced in the provided content describes the bug as involving issetugid(), rsh, and libmalloc on OS X 10.9.5 and 10.10.5. In practice, a local attacker can invoke the vulnerable setuid-root rsh binary in a way that causes unsafe handling of attacker-controlled environment state, resulting in execution with elevated privileges and escalation to root.

Share:
For your environment

Are you exposed to this one?

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.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

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

Successful exploitation results in full local privilege escalation to root on affected OS X systems. An attacker who already has code execution as an unprivileged local user can bypass normal privilege boundaries, install persistence, modify protected system locations, load additional malware components, disable or evade security tooling, and take complete control of the host. The provided context specifically notes use of this vulnerability by FinSpy malware as part of a first-stage root acquisition process.

Mitigation

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

Because this is a local privilege escalation, mitigation depends on reducing opportunities for local code execution and limiting access to the vulnerable binary. Restrict untrusted local user access, prevent execution of unapproved binaries and scripts with application control, monitor for abnormal invocation of setuid utilities such as rsh, and harden systems by minimizing legacy services and components. If rsh/remote_cmds is not needed, disabling or removing access to it reduces exposure. Detection opportunities include monitoring for suspicious environment-variable manipulation around privileged process launches.

Remediation

Patch, then assume compromise.

Upgrade affected Apple OS X systems to OS X 10.11 or later, as the vulnerability affects versions before 10.11. Apply all relevant Apple security updates so the vulnerable rsh/remote_cmds component is replaced with the patched version. Where operationally feasible, remove or disable legacy remote_cmds components and setuid-root utilities that are not required.
PUBLIC EXPLOITS

Exploits

No valid public exploits. Mallory filtered out 1 candidate as fakes, detection scripts, or README-only repos.

VALID 0 / 1 TOTALView more in app

All candidate exploits were filtered out by Mallory's validation.

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
AppleMac Os Xoperating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

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, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware1

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity

Community discussion across Reddit, Mastodon, and other social sources.