CVE-2024-43399: Mobile Security Framework (MobSF) has a Zip Slip Vulnerability in .a Static Library Files
Summary Upon reviewing the MobSF source code, I identified a flaw in the Static Libraries analysis section. Specifically, during the extraction of .a extension files, the measure intended to prevent Zip Slip attacks is improperly implemented. Since the implemented measure can be bypassed, the vulnerability allows an attacker to extract files to any desired location within the server running MobSF.
Published Aug 19, 2024 · Updated Aug 20, 2024
Affected packages
mobsf
- Ecosystem
- PyPI
- Affected
- <= 4.0.6
- Fixed in
- 4.0.7
- Check
pip show mobsf
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
Upon reviewing the MobSF source code, I identified a flaw in the Static Libraries analysis section. Specifically, during the extraction of .a extension files, the measure intended to prevent Zip Slip attacks is improperly implemented.
Since the implemented measure can be bypassed, the vulnerability allows an attacker to extract files to any desired location within the server running MobSF.
Details
Upon examining lines 183-192 of the mobsf/StaticAnalyzer/views/common/shared_func.py file, it is observed that there is a mitigation against Zip Slip attacks implemented as a.decode('utf-8', 'ignore').replace('../', '').replace('..\\', ''). However, this measure can be bypassed using sequences like ....//....//....//. Since the replace operation is not recursive, this sequence is transformed into ../../../ after the replace operation, allowing files to be written to upper directories.
For the proof of concept, I created an .a archive file that renders MobSF unusable by writing an empty file with the same name over the database located at /home/mobsf/.MobSF/db.sqlite3.
I am including the binary used for the POC named poc.VULN. To test it, you need to rename this binary to poc.a.
Warning: As soon as you scan this file with MobSF, the database will be deleted, rendering MobSF unusable.
PoC Binary File (poc.VULN)
PoC
https://github.com/user-attachments/assets/3225ccb0-cb00-47a5-8305-37a40ca1ae7f
Impact
When a malicious .a file is scanned with MobSF, a critical vulnerability is present as it allows files to be extracted to any location on the server where MobSF is running. In this POC, I deleted the database, but it is also possible to achieve RCE by overwriting binaries of certain tools or by overwriting the /etc/passwd file.
Credited to bulutenes.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-68922
MobSF Vulnerable to Arbitrary File Read via Path Traversal in ZIP Uploads
medium5.5Aug 18, 2026CVE-2026-68923
MobSF's CSRF checks not enforced after Django migration
medium6.5Aug 18, 2026CVE-2026-68924
MobSF Vulnerable to Zip Bomb Denial of Service via Per-File Size Limit Bypass in ZIP/APK Extraction
medium4.9Aug 18, 2026CVE-2026-68927
MobSF has SSRF port restriction bypass in assetlinks_check
low3.0Aug 18, 2026CVE-2026-33545
MobSF has SQL Injection in its SQLite Database Viewer Utils
medium5.3Mar 24, 2026CVE-2026-24490
MobSF has Stored XSS via Manifest Analysis - Dialer Code Host Field
high8.1Jan 26, 2026
