{"id":"CVE-2024-43399","aliases":["CVE-2024-43399","GHSA-4hh3-vj32-gr6j","PYSEC-2026-1665"],"related":[],"kind":"vulnerability","state":"published","title":"Mobile Security Framework (MobSF) has a Zip Slip Vulnerability in .a Static Library Files","summary":"Mobile Security Framework (MobSF) is a pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis. Before 4.0.7, there is a flaw in the Static Libraries analysis section. Specifically, during the extraction of .a extension files, the measure intended to prevent Zip Slip attacks is improperly implemented. Since the implemented measure can be bypassed, the vulnerability allows an attacker to extract files to any desired location within the server running MobSF. This vulnerability is fixed in 4.0.7.","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. Before 4.0.7, there is a flaw in the Static Libraries analysis section. Specifically, during the extraction of .a extension files, the measure intended to prevent Zip Slip attacks is improperly implemented. Since the implemented measure can be bypassed, the vulnerability allows an attacker to extract files to any desired location within the server running MobSF. This vulnerability is fixed in 4.0.7.","source":"cvelist"},{"lang":"en","text":"### Summary\nUpon reviewing the MobSF source code, I identified a flaw in the Static Libraries analysis section. Specifically, during the extraction of .a extension files, the measure intended to prevent Zip Slip attacks is improperly implemented.\n\nSince the implemented measure can be bypassed, the vulnerability allows an attacker to extract files to any desired location within the server running MobSF.\n\n### Details\n\nUpon examining lines 183-192 of the `mobsf/StaticAnalyzer/views/common/shared_func.py` file, it is observed that there is a mitigation against Zip Slip attacks implemented as `a.decode('utf-8', 'ignore').replace('../', '').replace('..\\\\', '')`. However, this measure can be bypassed using sequences like `....//....//....//`. Since the replace operation is not recursive, this sequence is transformed into `../../../` after the replace operation, allowing files to be written to upper directories.\n\n<img width=\"448\" alt=\"image\" src=\"https://github.com/user-attachments/assets/fadf4bcc-1a92-4655-b66a-5349278ad9c5\">\n\n\nFor the proof of concept, I created an .a archive file that renders MobSF unusable by writing an empty file with the same name over the database located at `/home/mobsf/.MobSF/db.sqlite3`.\n\n<img width=\"300\" alt=\"poc a_1\" src=\"https://github.com/user-attachments/assets/54acf101-3931-401f-9970-a0934265eecb\">\n\n\nI am including the binary used for the POC named `poc.VULN`. To test it, you need to rename this binary to `poc.a`.\n\n **Warning:** As soon as you scan this file with MobSF, the database will be deleted, rendering MobSF unusable.\n\nPoC Binary File ([poc.VULN](https://drive.google.com/file/d/1K2eHYIZ1hUbs-Vi5zhKAKecnd0nDB8lO/view?usp=share_link))\n\n### PoC\n\n\nhttps://github.com/user-attachments/assets/3225ccb0-cb00-47a5-8305-37a40ca1ae7f\n\n\n\n### Impact\n\nWhen a malicious .a file is scanned with MobSF, a critical vulnerability is present as it allows files to be extracted to any location on the server where MobSF is running. In this POC, I deleted the database, but it is also possible to achieve RCE by overwriting binaries of certain tools or by overwriting the /etc/passwd file.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Mobile Security Framework (MobSF) es un framework de prueba de penetración, análisis de malware y evaluación de seguridad capaz de realizar análisis estáticos y dinámicos. Antes de 4.0.7, había una falla en la sección de análisis de librerías estáticas. En concreto, durante la extracción de archivos de extensión .a, la medida destinada a prevenir ataques Zip Slip se implementa incorrectamente. Dado que la medida implementada se puede eludir, la vulnerabilidad permite a un atacante extraer archivos a cualquier ubicación deseada dentro del servidor que ejecuta MobSF. Esta vulnerabilidad se solucionó en 4.0.7.","source":"nvd"}],"published":"2024-08-19T14:44:47.180Z","modified":"2026-07-07T17:57:03.404Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","score":8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","score":8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","score":8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","score":8,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}],"cwes":["CWE-22","CWE-23"],"affected":[{"ranges":[{"version":"< 4.0.7","status":"affected"}],"vendor":"MobSF","product":"Mobile-Security-Framework-MobSF","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"4.0.7","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.0.7"}],"ecosystem":"PyPI","package":"mobsf","purl":"pkg:pypi/mobsf","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.0.7"}],"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.0.7"}],"ecosystem":"PyPI","package":"mobsf","purl":"pkg:pypi/mobsf","source":"pysec"}],"references":[{"url":"https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-4hh3-vj32-gr6j","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/cc625fe8430f3437a473e82aa2966d100a4dc883","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-43399","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-4hh3-vj32-gr6j","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2024-08-19T15:23:58.694Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-43399","url":"https://www.cve.org/CVERecord?id=CVE-2024-43399","licence":"CVE Terms of Use","modified":"2024-08-19T15:27:04.688Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4hh3-vj32-gr6j","url":"https://github.com/advisories/GHSA-4hh3-vj32-gr6j","licence":"CC-BY-4.0","modified":"2026-07-07T17:57:03.404Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-43399","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-43399","licence":"Public domain","modified":"2026-06-17T07:50:58.333Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1665","url":"https://osv.dev/vulnerability/PYSEC-2026-1665","licence":"CC-BY-4.0","modified":"2026-07-07T17:47:05.322Z"}],"updatedAt":"2026-11-25T22:58:44.537Z","epss":{"score":0.00956,"percentile":0.62444,"date":"2026-12-01T12:00:22.000Z"}}