Medium

Mobile Security Framework (MobSF) Stored Cross-Site Scripting Vulnerability in "Diff or Compare" Functionality

  • Disclosed: 03.12.2024
  • Updated: 11.10.2026 13:18

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.

  1. On MobSF version 4.2.8, I clicked on "Unload & Analyze" button. 0

  2. I uploaded zip file as a name test.zip. 1

  3. I used an intercepting proxy tool while uploading a file and changed the value of the filename parameter from test.zip to <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. 2

  4. I accessed /recent_scans/ and found a file named <image src onerror=prompt(document.domain)>test.zip in the recent scans. Then, I clicked on the "Differ or Compare" button." 3

  5. I found that the application requires selecting a file to compare, and I selected the file <image src onerror=prompt(document.domain)>test.zip 4

  6. I found that the JavaScript in the filename value was executed in the web browser. 5

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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) mobsf < 4.2.9 4.2.9

References

CVSS score 6.1/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N
Weakness (CWE)
CWE-79
Platform
Python (PyPI)
Package
mobsf
Disclosed
03.12.2024
Updated
11.10.2026 13:18

Sources and licenses

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

Vulnerability history: mobsf

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (22) in the archive
Total entries
22
First → latest
10.2022 08.2026
Without a fix
1
Exploited in attacks
0

Severity breakdown

  • High 9
  • Medium 11
  • Low 2

Disclosures per year

  1. 2022: 1
  2. 2023: 1
  3. 2024: 6
  4. 2025: 8
  5. 2026: 6
Severity:
  1. High · 6.5 CVE-2025-24805 < 4.3.1 4.3.1
  2. High · 6.5 CVE-2025-24804 < 4.3.1 4.3.1
  3. High · 8.1 CVE-2025-24803 < 4.3.1 4.3.1
  4. Mobile Security Framework (MobSF) Stored Cross-Site Scripting Vulnerability in "Diff or Compare" Functionality this entry
    Medium · 6.1 CVE-2024-53999 < 4.2.9 4.2.9
  5. High · 7.3 CVE-2024-29190 < 3.9.7 3.9.7

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.