{"id":"CVE-2024-53999","aliases":["CVE-2024-53999","GHSA-5jc6-h9w7-jm3p","PYSEC-2026-1666"],"related":[],"kind":"vulnerability","state":"published","title":"Mobile Security Framework (MobSF) Stored Cross-Site Scripting Vulnerability in \"Diff or Compare\" Functionality","summary":"Mobile Security Framework (MobSF) is a pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis. 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. This vulnerability is fixed in 4.2.9.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Mobile Security Framework (MobSF) is a pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis. 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. This vulnerability is fixed in 4.2.9.","source":"cvelist"},{"lang":"en","text":"### 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![0](https://github.com/user-attachments/assets/489013fe-cf21-4839-bd39-35eebad01a3a)\n\n2. I uploaded zip file as a name `test.zip`.\n![1](https://github.com/user-attachments/assets/c26a18ec-c276-43d5-97df-fb189b8d5a6a)\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![2](https://github.com/user-attachments/assets/90e275a2-58a4-4c0d-9b6a-399ec071cdf2)\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![3](https://github.com/user-attachments/assets/0997a437-5841-49c1-ae94-e0e76173bdb6)\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![4](https://github.com/user-attachments/assets/a156f058-732f-4763-8753-b0cef4075d53)\n\n6. I found that the JavaScript in the filename value was executed in the web browser.\n![5](https://github.com/user-attachments/assets/b0a9bcbf-af70-4ec6-a22d-6224dfc55639)\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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Mobile Security Framework (MobSF) es un framework de evaluación de seguridad, análisis de malware y pruebas de penetración capaz de realizar análisis estáticos y dinámicos. La aplicación permite a los usuarios cargar archivos con scripts en el parámetro filename. Como resultado, un usuario malintencionado puede cargar un archivo de script al sistema. Cuando los usuarios de la aplicación utilizan la función \"Diff or Compare\", se ven afectados por una vulnerabilidad de Cross-Site Scripting almacenado. Esta vulnerabilidad se solucionó en la versión 4.2.9.","source":"nvd"}],"published":"2024-12-03T15:39:32.625Z","modified":"2026-07-07T17:56:49.206Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 4.2.9","status":"affected"}],"vendor":"MobSF","product":"Mobile-Security-Framework-MobSF","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"4.2.9","status":"affected"}],"vendor":"mobsf","product":"mobile_security_framework","cpe":"cpe:2.3:a:mobsf:mobile_security_framework:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.2.9"}],"ecosystem":"PyPI","package":"mobsf","purl":"pkg:pypi/mobsf","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.2.9"}],"vendor":"opensecurity","product":"mobile_security_framework","cpe":"cpe:2.3:a:opensecurity:mobile_security_framework:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.2.9"}],"ecosystem":"PyPI","package":"mobsf","purl":"pkg:pypi/mobsf","source":"pysec"}],"references":[{"url":"https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-5jc6-h9w7-jm3p","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/27d165872847f5ae7417caf09f37edeeba741e1e","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53999","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/MobSF/Mobile-Security-Framework-MobSF","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/mobsf","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-5jc6-h9w7-jm3p","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2024-12-03T16:59:16.246Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-53999","url":"https://www.cve.org/CVERecord?id=CVE-2024-53999","licence":"CVE Terms of Use","modified":"2024-12-03T17:00:14.581Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5jc6-h9w7-jm3p","url":"https://github.com/advisories/GHSA-5jc6-h9w7-jm3p","licence":"CC-BY-4.0","modified":"2026-07-07T17:56:49.206Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-53999","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53999","licence":"Public domain","modified":"2026-06-17T08:09:38.263Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1666","url":"https://osv.dev/vulnerability/PYSEC-2026-1666","licence":"CC-BY-4.0","modified":"2026-07-07T17:47:05.320Z"}],"updatedAt":"2026-11-25T22:58:49.668Z","epss":{"score":0.00546,"percentile":0.47185,"date":"2026-12-01T12:00:22.000Z"}}