CVE-2024-53999: Mobsf Cross-Site Scripting Vulnerability
MODERATECVE-2024-53999 is a MODERATE (CVSS 6.1) 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) stored cross-site scripting vulnerability in "diff or compare" functionality. Remediation is available by upgrading affected packages to version 4.2.9.
CVE-2024-53999 at a Glance
Security Impact
CVSS: 6.1
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:R/S:U/C:H/I:H/A:N).
How to Fix CVE-2024-53999
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.2.9
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-2024-53999, 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.2.9), 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-2024-53999 Affected Mobsf Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mobsf
|
PyPI |
< 4.2.9
|
4.2.9
|
References
Frequently Asked Questions
What is CVE-2024-53999?
Which Mobsf versions are affected?
What version fixes CVE-2024-53999?
Is mobsf affected?
What is the CVSS score of CVE-2024-53999?
What CWE is associated with CVE-2024-53999?
How can I check PyPI dependencies for CVE-2024-53999?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5jc6-h9w7-jm3p",
"modified" : "2025-06-30T12:51:06Z",
"published" : "2024-12-03T18:45:22Z",
"aliases" : [ "CVE-2024-53999" ],
"summary" : "Mobile Security Framework (MobSF) Stored Cross-Site Scripting Vulnerability in \"Diff or Compare\" Functionality",
"details" : "### Summary\nThe 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.\n\n### Details\nI 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 _ . \n\n### PoC\n_Complete instructions, including specific configuration details, to reproduce the vulnerability._\n1. On MobSF version 4.2.8, I clicked on \"Unload & Analyze\" button.\n\n\n2. I uploaded zip file as a name `test.zip`.\n\n\n3. 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.\n\n\n4. 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.\"\n\n\n5. I found that the application requires selecting a file to compare, and I selected the file `<image src onerror=prompt(document.domain)>test.zip`\n\n\n6. I found that the JavaScript in the filename value was executed in the web browser.\n\n\n\n### Impact\nAllowing 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "mobsf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.2.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-5jc6-h9w7-jm3p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-53999"
}, {
"type" : "WEB",
"url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/27d165872847f5ae7417caf09f37edeeba741e1e"
}, {
"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" : "2024-12-03T18:45:22Z",
"nvd_published_at" : "2024-12-03T16:15:24Z"
}
}