Ajin Abraham 62563ca429 [HOTFIX][Security] Security Updates July 5 2026 (#2627)
Security Fixes

[GHSA-8j49-mmcx-4mp5] Arbitrary File Read via Path Traversal in ZIP/APK Icon Extraction
The android:icon attribute from an APK manifest was interpolated into file paths without validation, allowing a crafted APK to read arbitrary files from the server. Fixed by adding is_path_traversal() and is_safe_path() guards in find_icon_path_zip. Dependency bump included.

[GHSA-3p54-567p-2wpr] CSRF Checks Not Enforced After Django Middleware Migration
The migration from the deprecated MIDDLEWARE_CLASSES to MIDDLEWARE omitted CsrfViewMiddleware, SecurityMiddleware, and XFrameOptionsMiddleware, leaving CSRF, HSTS, and clickjacking protections silently disabled. All three have been restored to the active MIDDLEWARE tuple. The now-dead MIDDLEWARE_CLASSES block has been removed to prevent future confusion.

[GHSA-x768-8642-mmq9] Zip Bomb Denial of Service via Per-File Size Limit Bypass
The per-file size check in ZIP extraction logged a warning on oversized members but was missing a continue, allowing files exceeding ZIP_MAX_UNCOMPRESSED_FILE_SIZE to be extracted anyway as long as the aggregate limit was not reached. Fixed by adding the missing continue.

[GHSA-95px-34x5-p37h] SSRF Port Restriction Bypass in assetlinks_check
valid_host() was called with only the bare hostname, allowing android:port to be appended afterward without going through port validation, bypassing the HTTP/HTTPS-only restriction. Fixed with a two-layer approach: primary port allowlist check before URL assembly in get_browsable_activities, and a defence-in-depth re-check in _check_url.

Hardening

The hand-rolled safe_extract used os.path.abspath (symlink-blind) instead of os.path.realpath, creating a TOCTOU window where a symlink could redirect extraction outside the destination directory. Replaced with Python 3.12's tarfile.extractall(filter='data') (PEP 706), which rejects symlinks, hardlinks, absolute paths, and traversal members per-member before extraction. A robust realpath-based fallback is included for older Python versions.
Both download_app_data call sites in the iOS dynamic analyser now wrap app_container and tarfile with shlex.quote when building the SSH tar command, as defensive coding hygiene.
Refactoring

is_path_traversal, is_safe_path, clean_filename, cmd_injection_check, is_pipe_or_link, and is_attack_pattern were scattered across utils.py and shared.py. All have been moved to mobsf/MobSF/security.py as the single authoritative location for security primitives.
Developer Tooling

AGENTS.md / CLAUDE.md - AI agent guidelines
Added a coding-standards document for AI coding agents (Cursor, Claude, Codex) covering MobSF-specific secure-by-default patterns: path traversal guards, archive extraction safety, Django middleware active-tuple hygiene, split-validation anti-patterns (SSRF port bypass), guard completeness (continue/return/raise after every security check), and Django-specific security features (form validators, decorators, middleware). CLAUDE.md is a symlink to AGENTS.md.
2026-07-05 16:55:49 -07:00
2025-04-25 14:05:53 -07:00
2024-11-25 00:04:40 -08:00
2025-08-30 23:46:20 -07:00
2025-08-30 23:46:20 -07:00
2025-08-30 23:46:20 -07:00
2015-09-10 00:40:11 +05:30
2024-11-10 00:44:20 -08:00
2025-08-30 23:46:20 -07:00
2025-08-30 23:46:20 -07:00

Mobile Security Framework (MobSF)

Mobile Security Framework (MobSF) is a security research platform for mobile applications in Android, iOS and Windows Mobile. MobSF can be used for a variety of use cases such as mobile application security, penetration testing, malware analysis, and privacy analysis. The Static Analyzer supports popular mobile app binaries like APK, IPA, APPX and source code. Meanwhile, the Dynamic Analyzer supports both Android and iOS applications and offers a platform for interactive instrumented testing, runtime data and network traffic analysis. MobSF seamlessly integrates with your DevSecOps or CI/CD pipeline, facilitated by REST APIs and CLI tools, enhancing your security workflow with ease.

Made with Love in India

Docker Pulls python PyPI version platform License MobSF tests Quality Gate Status GitHub closed issues CII Best Practices

ToolsWatch Best Security Tools 2016 ToolsWatch Best Security Tools 2017 Blackhat Arsenal Asia 2015 Blackhat Arsenal Asia 2018 Blackhat Arsenal Europe 2023

MobSF is also bundled with Android Tamer, BlackArch and Pentoo.

Support MobSF

Donate to MobSF

Has MobSF made a difference for you? Show your support and help us innovate with a donation. It's easy to build open source, maintaining one is a different story.

Long live open source!

Documentation

Quick setup with docker

docker pull opensecurity/mobile-security-framework-mobsf:latest
docker run -it --rm -p 8000:8000 opensecurity/mobile-security-framework-mobsf:latest

# Default username and password: mobsf/mobsf

See MobSF Documentation

Collaborators

Ajin Abraham india | Magaofei china | Matan Dobrushin israel | Vincent Nadal france

e-Learning Courses & Certifications

MobSF Course Automated Mobile Application Security Assessment with MobSF -MAS

Android Security Tools Course Android Security Tools Expert -ATX

MobSF Support

  • Free Support: Free limited support, questions, help and discussions, join our Slack channel Join_MobSF_Slack
  • Enterprise Support: Priority feature requests, live support & onsite training, see MobSF Support Packages

Contribution, Feature Requests & Bugs

  • Read CONTRIBUTING.md before opening bugs, feature requests and pull request.
  • For Project updates and announcements, follow @ajinabraham or @OpenSecurity_IN.
  • Github Issues are only for tracking bugs and feature requests. Do not post support or help queries there. We have a slack channel for that.

Static Analysis - Android

mobsf_android_static_analysis

Static Analysis - iOS

mobsf_ios_ipa_static_analysis

Dynamic Analysis - Android APK

mobsf_android_dynamic_analysis

Web API Viewer

mobsf_web_api_fuzzing_with_burp

Dynamic Analysis - iOS IPA

mobsf_ios_dynamic_analysis

Past Collaborators

Honorable Contributors & Shoutouts

  • Amrutha VC - For the new MobSF logo
  • Dominik Schlecht - For the awesome work on adding Windows Phone App Static Analysis to MobSF
  • Esteban - Better Android Manifest Analysis and Static Analysis Improvement.
  • Matan Dobrushin - For adding Android ARM Emulator support to MobSF - Special thanks goes for cuckoo-droid
  • Shuxin - Android Binary Analysis
  • Abhinav Saxena - (@xandfury) - For Travis CI and Logging integration
  • netguru Netguru (@karolpiateknet, @mtbrzeski) - For iOS Swift support, Rule contributions and SAST refactoring.
  • Maxime Fawe - (@Arenash13) - For Matching Strategy implementation of SAST pattern matching algorithms.
  • Abhinav Sejpal (@Abhinav_Sejpal) - For poking me with bugs, feature requests, and UI & UX suggestions
  • Anant Srivastava (@anantshri) - For Activity Tester Idea
  • Anto Joseph (@antojoseph) - For the help with SuperSU
  • Bharadwaj Machiraju (@tunnelshade) - For writing pyWebProxy from scratch
  • Rahul (@c0dist) - Kali Support
  • MindMac - For writing Android Blue Pill
  • Oscar Alfonso Diaz - (@OscarAkaElvis) - For Dockerfile contributions
  • Thomas Abraham - For JS Hacks on UI
  • Tim Brown (@timb_machine) - For the iOS Binary Analysis Ruleset
  • Shanil Prasad (@Rajuraju14) - For improving iOS ATS Analysis
  • Jovan Petrovic (@JovanPetrovic) - For sponsoring a server to host mobsf.live
S
Description
Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis.
Readme GPL-3.0
1.6 GiB
Languages
JavaScript 56.7%
Python 22.5%
HTML 18.3%
CSS 2.2%
Shell 0.2%