# CVE-2026-39973: Apktool: Path Traversal to Arbitrary File Write

> A malicious APK can exploit path traversal in Apktool to write arbitrary files, potentially leading to remote code execution.

- **Severity:** High 7.1 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 21 Apr 2026
- **Updated:** 23 Apr 2026
- **Also known as:** GHSA-m8mh-x359-vm8m, UBUNTU-CVE-2026-39973

## What is CVE-2026-39973?

CVE-2026-39973 is a high-severity path traversal vulnerability in iBotPeaches Apktool, published on 21 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

Apktool is a tool for reverse engineering Android APK files. In versions 3.0.0 and 3.0.1, a path traversal vulnerability in `brut/androlib/res/decoder/ResFileDecoder.java` allows a maliciously crafted APK to write arbitrary files to the filesystem during standard decoding (`apktool d`). This is a security regression introduced in commit e10a045 (PR #4041, December 12, 2025), which removed the `BrutIO.sanitizePath()` call that previously prevented path traversal in resource file output paths. An attacker can embed `../` sequences in the `resources.arsc` Type String Pool to escape the output directory and write files to arbitrary locations, including `~/.ssh/config`, `~/.bashrc`, or Windows Startup folders, escalating to RCE. The fix in version 3.0.2 re-introduces `BrutIO.sanitizePath()` in `ResFileDecoder.java` before file write operations.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-39973?

2 open source packages ship an affected version, including org.apktool:apktool-lib. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apktool:apktool-lib` | Maven | From 3.0.0 | 3.0.2 |
| `org.apktool:apktool-lib` | Maven | From 3.0.0 | 3.0.2 |

Products: Apktool Apktool.

## How do I fix CVE-2026-39973?

Upgrade org.apktool:apktool-lib to 3.0.2 or later.

## Is CVE-2026-39973 being exploited?

There is no known exploitation of CVE-2026-39973 in the wild and no public exploit code.

Public exploit code:

- Proof of concept (builder) for CVE-2026-39973 (apktool) (github_poc): https://github.com/frawlaboy/CVE-2026-39973-PoC

## Other vulnerabilities in iBotPeaches Apktool

- [CVE-2024-24482](https://insights.sbomify.com/CVE-2024-24482/): Path traversal in n/a (critical 9.8)
- [CVE-2024-21633](https://insights.sbomify.com/CVE-2024-21633/): Arbitrary file write on Decoding (high 7.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-39973 and fix it if it is affected.

What it is: CVE-2026-39973 is a high-severity path traversal vulnerability in iBotPeaches Apktool, published on 21 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-39973 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apktool:apktool-lib (Maven): affected from 3.0.0; fixed in 3.0.2
- org.apktool:apktool-lib (Maven): affected from 3.0.0; fixed in 3.0.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-39973/ (Markdown: https://insights.sbomify.com/CVE-2026-39973/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-39973
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-39973
- OSV: https://osv.dev/vulnerability/CVE-2026-39973

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-39973/
Summaries are generated and may contain mistakes; the official description above is the record.
