Executive brief
MobSF is a framework for analyzing Android and iOS mobile applications. A flaw in the icon extraction feature fails to validate file paths from uploaded Android packages, allowing an authenticated user to read arbitrary files from the server and download them. An attacker could access sensitive configuration files, security artifacts, or other internal server data that should not be exposed.
Technical details
The vulnerability is a classic path traversal (CWE-22) in the find_icon_path_zip() function within icon_analysis.py. The function processes the android:icon attribute from AndroidManifest.xml without proper validation and does not sanitize path traversal sequences like "../". An attacker uploads a malicious APK with a crafted icon path (e.g., "res/../../../signatures/maltrail-malware-domains.txt") that resolves to files outside the intended scan directory. The vulnerable code uses os.path.join() with unsanitized input, allowing the path to traverse outside the scan root. Once resolved, matching files are copied to DWD_DIR with a predictable filename derived from the archive's MD5 hash, enabling deterministic file retrieval via GET /download/<md5>-icon.<ext>. An attacker must have scan upload permissions (authenticated user) but gains read access to any file on the filesystem with an extension in ALLOWED_EXTENSIONS. Patch: version 4.5.1 fixes this by validating input with the is_path_traversal() utility function.
Affected products
- MobSF Mobile Security Framework MobSF < 4.5.1
Timeline
- 2026-08-18: disclosed: Vulnerability published to GitHub Advisory Database
- 2026-08-18: patched: Version 4.5.1 released with fix
References
- https://api.github.com/users/Daniel-GrunbergerCA
- https://github.com/Daniel-GrunbergerCA
- https://api.github.com/users/Daniel-GrunbergerCA/gists%7B/gist_id%7D
- https://api.github.com/users/Daniel-GrunbergerCA/repos
- https://avatars.githubusercontent.com/u/84905812?v=4
- https://api.github.com/users/Daniel-GrunbergerCA/events%7B/privacy%7D