ghsa-mwfg-948f-2cc5
Vulnerability from github
Vulnerable MobSF Versions: <= v4.3.2
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)
Details: A 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.
When 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.
Upcon ZIP extraction this icon file is saved by MobSF to: user/.MobSF/downloads/
This file becomes publicly accessible via the web interface at:
http://127.0.0.1:8081/download/filename.svg
If 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.
Proof Of Concept:
- Create a malicious SVG file (ic_launcher.svg) with an embedded XSS payload.
- Place the file in the Android Studio project directory: /app/src/main/res/mipmap-hdpi/ic_launcher.svg
- Zip the project directory and upload it to MobSF.
- 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.
- The XSS payload is executed, confirming the vulnerability.
{ "affected": [ { "database_specific": { "last_known_affected_version_range": "\u003c= 4.3.2" }, "package": { "ecosystem": "PyPI", "name": "mobsf" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "4.3.3" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-46335" ], "database_specific": { "cwe_ids": [ "CWE-79" ], "github_reviewed": true, "github_reviewed_at": "2025-05-05T14:55:59Z", "nvd_published_at": "2025-05-05T19:15:56Z", "severity": "MODERATE" }, "details": "**Vulnerable MobSF Versions:** \u003c= 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 \u2264 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/\u003cfilename\u003e.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", "id": "GHSA-mwfg-948f-2cc5", "modified": "2025-05-05T22:06:28Z", "published": "2025-05-05T14:55:59Z", "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" } ], "schema_version": "1.4.0", "severity": [ { "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", "type": "CVSS_V4" } ], "summary": "Mobile Security Framework (MobSF) Allows Stored Cross Site Scripting (XSS) via malicious SVG Icon Upload" }
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.