Apktool Path Traversal: Arbitrary File Write Leads to RCE
The National Vulnerability Database has detailed CVE-2026-39973, a high-severity path traversal vulnerability in Apktool versions 3.0.0 and 3.0.1. This flaw, located in brut/androlib/res/decoder/ResFileDecoder.java, allows a maliciously crafted Android Package Kit (APK) to write arbitrary files to the filesystem during the standard decoding process (apktool d). An attacker can embed ../ sequences within the resources.arsc Type String Pool, enabling them to escape the intended output directory.
This is a critical security regression, stemming from commit e10a045 (PR #4041, December 12, 2025), which inadvertently removed the BrutIO.sanitizePath() call. This function previously prevented path traversal in resource file output paths. Its absence opens the door for attackers to write files to sensitive locations, such as ~/.ssh/config, ~/.bashrc, or Windows Startup folders. This arbitrary file write capability directly escalates to remote code execution (RCE).
Apktool version 3.0.2 addresses this vulnerability by re-introducing the BrutIO.sanitizePath() call within ResFileDecoder.java prior to any file write operations. The National Vulnerability Database assigns a CVSS score of 7.1 (HIGH) to this issue, underscoring its significant impact.
What This Means For You
- If your security team or development pipeline uses Apktool for reverse engineering Android applications, immediately verify that all instances are updated to version 3.0.2 or later. Any use of versions 3.0.0 or 3.0.1 exposes your systems to arbitrary file writes and potential RCE via a crafted APK. This isn't theoretical; an attacker's calculus here is straightforward: get a target to decode a malicious APK, and they own the system. Patch now.
Related ATT&CK Techniques
🛡️ Detection Rules
4 rules · 6 SIEM formats4 detection rules auto-generated for this incident, mapped to MITRE ATT&CK. Sigma YAML is free — export to any SIEM format via the Intel Bot.
CVE-2026-39973: Apktool Path Traversal During Decoding
Indicators of Compromise
| ID | Type | Indicator |
|---|---|---|
| CVE-2026-39973 | Vulnerability | CVE-2026-39973 |
Source & Attribution
| Source Platform | NVD |
| Channel | National Vulnerability Database |
| Published | April 21, 2026 at 05:16 UTC |
This content was AI-rewritten and enriched by Shimi's Cyber World based on the original source. All intellectual property rights remain with the original author.
Believe this infringes your rights? Submit a takedown request.