CVE-2021-21386: Improper Neutralization of Argument Delimiters in a Decompiling Package Process in APKLeaks
9.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.76573%
CWE
Published
1/21/2022
Updated
9/7/2023
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
APKLeaks | pip | < 2.0.4 | 2.0.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the pre-patch command construction pattern '%s %s -d %s --deobf' which directly interpolated user-controlled values (dex path and tempdir) into an OS command. This allowed injection of command arguments through malicious package names. The commit explicitly fixes this by: 1) Using an array for arguments 2) Applying proper shell escaping with pipes.quote()
3) Safely joining arguments. The vulnerable code path is clearly in the decompile()
method where the unsafe os.system()
call originated.