CVE-2026-39973
JSON

7.1high

Apktool: Path Traversal to Arbitrary File Write

Severity
7.1high CVSS:3.1 by GitHub_M
Exploit likelihood
0.18% (higher than 8% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-m8mh-x359-vm8m

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.

Affected

Product or packageVersionsReported by
iBotPeaches Apktool>= 3.0.0, < 3.0.2CVE List
org.apktool:apktool-lib (Maven)from 3.0.0 before 3.0.2GitHub Advisory Database
apktool apktoolfrom 3.0.0 before 3.0.2NVD

All scores

GitHub_M7.1high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
GitHub7.1high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
NVD7.1high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Classification

CWE-22

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database

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.

Fix: Re-introduce BrutIO.sanitizePath() in ResFileDecoder.java before file write operations.

NVD (es)

Apktool es una herramienta para la ingeniería inversa de archivos APK de Android. En las versiones 3.0.0 y 3.0.1, una vulnerabilidad de salto de ruta en “brut/androlib/res/decoder/ResFileDecoder.java” permite que un APK creado con fines maliciosos escriba archivos arbitrarios en el sistema de archivos durante la decodificación estándar (“apktool d”). Esto es una regresión de seguridad introducida en el commit e10a045 (PR #4041, 12 de diciembre de 2025), que eliminó la llamada a “BrutIO.sanitizePath()” que previamente prevenía el salto de ruta en las rutas de salida de los archivos de recursos. Un atacante puede incrustar secuencias “.. / ” en el Type String Pool de “resources.arsc” para escapar del directorio de salida y escribir archivos en ubicaciones arbitrarias, incluyendo “~/.ssh/config”, “~/.bashrc”, o carpetas de inicio de Windows, escalando a RCE. La corrección en la versión 3.0.2 reintroduce “BrutIO.sanitizePath()” en “ResFileDecoder.java” antes de las operaciones de escritura de archivos.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-39973 changed 2026-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-m8mh-x359-vm8m changed 2026-04-23CC-BY-4.0
NVDCVE-2026-39973 changed 2026-10-26Public domain