Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2017-13209: Privilege Escalation via Insecure PID Check in Android ServiceManager

Published Jan 12, 2018 · 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.8High · v3
EPSS0.75%56th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
Google
IdentifiersCVE-2017-13209CWE-269

CVE-2017-13209 is a local privilege escalation vulnerability in Android 8.0 and 8.1, specifically in the ServiceManager::add function of the hardware service manager. The vulnerability arises from an insecure permissions check that relies solely on the PID of the caller. This flaw allows a local application or service to register or replace a Hardware Abstraction Layer (HAL) service with its own, potentially malicious, implementation. As a result, an attacker can execute code as a privileged process without requiring additional execution privileges or user interaction.

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 gain elevated privileges by replacing a HAL service, leading to arbitrary code execution as a privileged process. This can compromise the integrity and security of the device, potentially allowing further attacks or persistence mechanisms.

Mitigation

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

Restrict the ability of untrusted applications to interact with the hardware service manager. Employ SELinux policies to limit access to privileged interfaces. Monitor for abnormal service registrations or replacements as an indicator of compromise until a patch can be applied.

Remediation

Patch, then assume compromise.

Upgrade to a patched version of Android (post-8.1) where the permissions check in ServiceManager::add has been corrected to properly authenticate and authorize service registration requests. Apply security updates provided by the device manufacturer or Google.

Public exploits

Exploits

1 exploit validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
CVE-2017-13209This repository contains a native Android C++ exploit/PoC binary, not a framework module. The project builds a binary named 'hwservice' from main.cpp and DummyService.cpp, with several generated-looking HIDL wrapper headers (BnHwDummyService.h, BpHwDummyService.h, BsDummyService.h, IDummyService.h, IHwDummyService.h) that support a fabricated HIDL service implementation. Repository structure: main.cpp is the primary entry point and orchestrates the exploit flow. It performs low-level Binder/HwBinder transactions against Android's hwservicemanager and token manager, including helper routines to find a hardware service, add/register a service, create or resolve tokens, and split execution into parent/child flows. DummyService.cpp implements the malicious/fake HIDL service object (IDummyService) and contains the core exploitation logic inside interfaceChain(), where it manipulates process lifecycle and triggers audio-service transactions to influence PID/service-manager state. The remaining headers are support code for the HIDL interface plumbing. The Makefile and Android.bp define Android/NDK builds, and the Makefile includes adb push/run helpers for deploying to /data/local/tmp/. Main exploit capability: the code attempts to register or replace a hardware service by abusing Android HIDL token management and hwservicemanager registration behavior. It directly invokes Binder transaction codes on IServiceManager (notably get/add style operations) and interacts with ITokenManager to obtain a binder from a token. The exploit then registers that binder under the 'default' service name. The fake service advertises itself as android.hidl.base@1.0::IBase rather than a legitimate custom interface, and even returns a fake hash chain, indicating deliberate service fabrication. Notable exploitation behavior: DummyService.cpp's interfaceChain() is weaponized as a trigger point. When called, it ensures sound effects are loaded via the 'audio' Binder service, kills a child process, waits for it, repeatedly forks to cycle process IDs toward a target PID, unloads and reloads sound effects, and sleeps to allow threads to spawn. Comments explicitly state the goal is to let system_server occupy a chosen PID so ACL checks pass, enabling service replacement. This strongly suggests a local privilege-escalation or service-impersonation exploit against Android's hardware service registration controls. There are no external network C2 endpoints, URLs, or IPs. The observable targets are Android Binder/HIDL interface names, service names, and local deployment paths. Overall, this is an operational local Android exploit PoC focused on Binder/HIDL service hijacking rather than remote exploitation.caofangkuai · Disclosed Jul 17, 2026 · cpp · c++ · local · containerOperational
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
GoogleAndroidoperating_system
FAQ

Frequently asked questions

Is CVE-2017-13209 exploited in the wild?
As of Oct 16, 2026, Mallory has no reports of CVE-2017-13209 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2017-13209?
Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2017-13209, the earliest disclosed Jul 17, 2026.
Is there a patch for CVE-2017-13209?
Upgrade to a patched version of Android (post-8.1) where the permissions check in ServiceManager::add has been corrected to properly authenticate and authorize service registration requests. Apply security updates provided by the device manufacturer or Google.
What products are affected by CVE-2017-13209?
Google Android.
How severe is CVE-2017-13209?
CVE-2017-13209 has a CVSS v3 score of 7.8 (High) and an EPSS score of 0.75% (56th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

No public activity tracked yet. Mallory keeps watching.

View more in app →

No public activity observed for this vulnerability.

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.