CVE-2025-46730: Mobsf Remote Code Execution Vulnerability
MODERATECVE-2025-46730 is a MODERATE (CVSS 6.8) remote code execution vulnerability (CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)) affecting Mobsf libraries in the PyPI ecosystem. The issue involves mobile security framework (mobsf) allows web server resource exhaustion via zip of death attack. Remediation is available in the latest vendor maintenance releases.
CVE-2025-46730 at a Glance
Security Impact
CVSS: 6.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:N/A:H).
How to Fix CVE-2025-46730
To remediate this vulnerability, upgrade all affected Mobsf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install mobsf>=Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show mobsf
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-46730, inspect your installed packages using pip:
pip show mobsf
Analyze the terminal output to locate any version of Mobsf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The pip show mobsf command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-409: Improper Handling of Highly Compressed Data (Data Amplification), where the product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output. In Mobsf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-46730 Affected Mobsf Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mobsf
|
PyPI |
≤ 4.3.2
|
|
References
Frequently Asked Questions
What is CVE-2025-46730?
Which Mobsf versions are affected?
What version fixes CVE-2025-46730?
Is mobsf affected?
What is the CVSS score of CVE-2025-46730?
What CWE is associated with CVE-2025-46730?
How can I check PyPI dependencies for CVE-2025-46730?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c5vg-26p8-q8cr",
"modified" : "2025-05-05T22:07:44Z",
"published" : "2025-05-05T19:32:27Z",
"aliases" : [ "CVE-2025-46730" ],
"summary" : "Mobile Security Framework (MobSF) Allows Web Server Resource Exhaustion via ZIP of Death Attack",
"details" : "**Vulnerable MobSF Versions:** <= v4.3.2\n\n**Details:**\nMobSF is a widely adopted mobile application security testing tool used by security teams across numerous organizations. Typically, MobSF is deployed on centralized internal or cloud-based servers that also host other security tools and web applications. Access to the MobSF web interface is often granted to internal security teams, audit teams, and external vendors. \n\nMobSF provides a feature that allows users to upload ZIP files for static analysis. Upon upload, these ZIP files are automatically extracted and stored within the MobSF directory. However, this functionality lacks a check on the total uncompressed size of the ZIP file, making it vulnerable to a ZIP of Death (zip bomb) attack.\n\nDue to the absence of safeguards against oversized extractions, an attacker can craft a specially prepared ZIP file that is small in compressed form but expands to a massive size upon extraction. Exploiting this, an attacker can exhaust the server's disk space, leading to a complete denial of service (DoS) not just for MobSF, but also for any other applications or websites hosted on the same server.\n\n**Attack Scenario:**\nSuppose the server hosting MobSF has 5 GB of free disk space..\n\nA malicious user will first create a genuine hello world application code using android studio and inside this code directory (app//src/main/java/APK_PATH/bomb.txt) he'll place a bomb.txt file. \n\nThis bomb.txt file will have billions of zeros to increase the file size on storage and make it to 4.99 GB. Now suppose the resultant hello world code directory including original code and bomb.txt files will be of 5GB, so the attacker will compress the entire hello world code directory to zip and resultant zip will be around 12-15 MBs only.\n\nAn attacker will upload this zip bomb using the MobSF web interface or API. So an attacker will spend only 12-15 MB of his bandwidth. \n\nNow the MobSF tool will extract that zip file and it'll be automatically converted into its original size 5GB.\n\nSo now a web server will be forced to store 5GB of data and its storage will be exhausted by an attacker's single request. \n\nWeb server's storage and resources will not be able to handle other running websites or applications as the storage is exhausted. This way an attacker can achieve complete Web Server Resource Exhaustion. \n \n**Impact:**\n1. This vulnerability can lead to complete server disruption in an organization which can affect other internal portals and tools too (which are hosted on the same server).\n2. If some organization has created their customised cloud based mobile security tool using MobSF core then an attacker can exploit this vulnerability to crash their servers.\n\n**POC:**\n1. Screen Recording : \nhttps://drive.google.com/file/d/1x7GEPJr2T04Ij5ZFQQtGWvUWXtM4M4aw/view?usp=sharing\n2. POC Zip Bomb File (Upon extraction this file will consume 6GB of storage) : https://drive.google.com/file/d/1N3apL1ySMecnt3HUQcDcuH7hsjPrdwUj/view?usp=sharing\n\n**Mitigation:**\nIt is recommended to implement a safeguard that checks the total uncompressed size of any uploaded ZIP file before extraction. If the estimated uncompressed size exceeds a safe threshold (e.g., 100 MB), MobSF should reject the file and notify the user.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "mobsf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "4.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-c5vg-26p8-q8cr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-46730"
}, {
"type" : "WEB",
"url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/6987a946485a795f4fd38cebdb4860b368a1995d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-409" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-05-05T19:32:27Z",
"nvd_published_at" : "2025-05-05T20:15:21Z"
}
}