CVE-2025-46335: Mobsf Cross-Site Scripting Vulnerability
MODERATECVE-2025-46335 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Mobsf libraries in the PyPI ecosystem. The issue involves mobile security framework (mobsf) allows stored cross site scripting (xss) via malicious svg icon upload. Remediation is available by upgrading affected packages to version 4.3.3.
CVE-2025-46335 at a Glance
How to Fix CVE-2025-46335
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>=4.3.3
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-46335, 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 4.3.3), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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-46335 Affected Mobsf Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mobsf
|
PyPI |
< 4.3.3
|
4.3.3
|
References
Frequently Asked Questions
What is CVE-2025-46335?
Which Mobsf versions are affected?
What version fixes CVE-2025-46335?
Is mobsf affected?
What CWE is associated with CVE-2025-46335?
How can I check PyPI dependencies for CVE-2025-46335?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mwfg-948f-2cc5",
"modified" : "2025-05-05T22:06:28Z",
"published" : "2025-05-05T14:55:59Z",
"aliases" : [ "CVE-2025-46335" ],
"summary" : "Mobile Security Framework (MobSF) Allows Stored Cross Site Scripting (XSS) via malicious SVG Icon Upload",
"details" : "**Vulnerable MobSF Versions:** <= v4.3.2\n\n**CVSS V4.0 Score:** 8.6 (CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N)\n\n**Details:**\nA Stored Cross-Site Scripting (XSS) vulnerability has been identified in MobSF versions ≤ 4.3.2. The vulnerability arises from improper sanitization of user-supplied SVG files during the Android APK analysis workflow.\n\nWhen an Android Studio project contains a malicious SVG file as an app icon (e.g path, /app/src/main/res/mipmap-hdpi/ic_launcher.svg), and the project is zipped and uploaded to MobSF, the tool processes and extracts the contents without validating or sanitizing the SVG. \n\nUpcon ZIP extraction this icon file is saved by MobSF to: user/.MobSF/downloads/<filename>.svg\n\nThis file becomes publicly accessible via the web interface at:\n\nhttp://127.0.0.1:8081/download/filename.svg\n\nIf the SVG contains embedded JavaScript (e.g., an XSS payload), accessing this URL via a browser leads to the execution of the script in the context of the MobSF user session, resulting in stored XSS.\n\n**Proof Of Concept:**\n\n1. Create a malicious SVG file (ic_launcher.svg) with an embedded XSS payload.\n\n\n\n2. Place the file in the Android Studio project directory: /app/src/main/res/mipmap-hdpi/ic_launcher.svg\n\n\n\n3. Zip the project directory and upload it to MobSF.\n\n\n\n4. After the scan, navigate to the \"Recent Scans\" page in the MobSF web interface and click on the scan entry and open the icon file in a new browser tab.\n\n\n\n5. The XSS payload is executed, confirming the vulnerability.\n\n",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "mobsf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.3.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.3.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-mwfg-948f-2cc5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-46335"
}, {
"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-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-05-05T14:55:59Z",
"nvd_published_at" : "2025-05-05T19:15:56Z"
}
}