When apktool d --force removes an existing decode output directory, it calls a recursive delete helper that treats a symbolic link to a directory as a real directory. If the chosen output path is a symlink, Apktool recurses into the symlink target and deletes files inside the target directory before removing the symlink. A malicious local setup can therefore cause a victim or automation running forced decode to delete files outside the intended decode output path.
When apktool d --force removes an existing decode output directory, it calls a recursive delete helper that treats a symbolic link to a directory as a real directory. If the chosen output path is a symlink, Apktool recurses into the symlink target and deletes files inside the target directory before removing the symlink. A malicious local setup can therefore cause a victim or automation running forced decode to delete files outside the intended decode output path.