CVE-2024-21633
Arbitrary file write on Decoding
Record summary
CVE-2024-21633 has a selected CVSS score of 7.8 (high); EIP currently links 1 repository PoC and 1 Nuclei template.
Description
Apktool is a tool for reverse engineering Android APK files. In versions 2.9.1 and prior, Apktool infers resource files' output path according to their resource names which can be manipulated by attacker to place files at desired location on the system Apktool runs on. Affected environments are those in which an attacker may write/overwrite any file that user has write access, and either user name is known or cwd is under user folder. Commit d348c43b24a9de350ff6e5bd610545a10c1fc712 contains a patch for this issue.
Exploitation context
Affected products and versions
1| Product | Source | Version range | Status |
|---|---|---|---|
ApktoolBrowse iBotPeaches / Apktool | CVE List | <= 2.9.1 | affected |
Proofs of concept
1Repository PoCs
GitHub0x33c0unt/CVE-2024-21633Repository PoCby 0x33c0untStars: 79Not analyzed4 files
Nuclei templates
1ProjectDiscoveryHIGHMobSF - Path TraversalCVSS 7.8
MobSF is vulnerable to an issue with apktool (CVE-2024-21633) that allows for RCE or arbitrary file writing. It does this through a path traversal vulnerability. This template tests for it by writing to a local file and reading that file. RCE can be achieved by overwriting jadx, as shown in the two POCs listed as references. The payload for this template exists inside the binary format of an APK, which is a zip file. This means that a hardcoded random hex string is checked for, rather than a standard dynamic random string.
Impact
Successful exploitation of the RCE version of this vulnerability can lead to unauthorized access to the MobSF instance, which could leak private intellectual property or deny access to part of the application.
Remediation
To remediate this vulnerability, upgrade MobSF to at least version 3.9.7. This version includes the fix for CVE-2024-21633.
Source: ProjectDiscovery