Mobile Security Framework (MobSF) Stored Cross-Site Scripting Vulnerability in "Diff or Compare" Functionality
Summary
The application allows users to upload files with scripts in the filename parameter. As a result, a malicious user can upload a script file to the system. When users in the application use the "Diff or Compare" functionality, they are affected by a Stored Cross-Site Scripting vulnerability.
Details
I found a Stored Cross-Site Scripting vulnerability in the "Diff or Compare" functionality. This issue occurs because the upload functionality allows users to upload files with special characters such as <, >, /, and " in the filename. This vulnerability can be mitigated by restricting file uploads to filenames containing only whitelisted characters, such as A-Z, 0-9, and specific special characters permitted by business requirements, like - or _ .
PoC
Complete instructions, including specific configuration details, to reproduce the vulnerability.
-
On MobSF version 4.2.8, I clicked on "Unload & Analyze" button.
-
I uploaded zip file as a name
test.zip. -
I used an intercepting proxy tool while uploading a file and changed the value of the filename parameter from
test.zipto<image src onerror=prompt(document.domain)>test.zip. This means I uploaded a file and set its name to a script value. As a result, the server allowed the file to be uploaded successfully. -
I accessed /recent_scans/ and found a file named
<image src onerror=prompt(document.domain)>test.zipin the recent scans. Then, I clicked on the "Differ or Compare" button." -
I found that the application requires selecting a file to compare, and I selected the file
<image src onerror=prompt(document.domain)>test.zip -
I found that the JavaScript in the filename value was executed in the web browser.
Impact
Allowing a malicious user to upload a script in the filename parameter can be used to steal information from other users or administrators when they perform the compare functionality. The script will be stored in the system permanently in this vulnerability.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Python (PyPI) | mobsf | < 4.2.9 | 4.2.9 |
Verweise
- https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-5jc6-h9w7-jm3p
- https://nvd.nist.gov/vuln/detail/CVE-2024-53999
- https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/27d165872847f5ae7417caf09f37edeeba741e1e
- https://github.com/MobSF/Mobile-Security-Framework-MobSF
- https://pypi.org/project/mobsf
- https://github.com/advisories/GHSA-5jc6-h9w7-jm3p
- CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N- Schwäche (CWE)
CWE-79- Plattform
- Python (PyPI)
- Paket
mobsf- Veröffentlicht
- 03.12.2024
- Aktualisiert
- 11.10.2026 13:18
Quellen und Lizenzen
OSV / GitHub Advisory Database - PYSEC-2026-1666 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-5jc6-h9w7-jm3p - CC BY 4.0
Schwachstellenhistorie: mobsf
Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 22
- Erste → letzte
- 10.2022 08.2026
- Ohne Fix
- 1
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Hoch 9
- Mittel 11
- Niedrig 2
Veröffentlichungen pro Jahr
- 2022: 1
- 2023: 1
- 2024: 6
- 2025: 8
- 2026: 6
-
Mobile Security Framework (MobSF) Stored Cross-Site Scripting Vulnerability in "Diff or Compare" Functionality dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.