{"schema_version":"1.9.0","id":"GHSA-3p54-567p-2wpr","published":"2026-08-18T18:01:13Z","modified":"2026-08-19T12:55:33.965056030Z","aliases":["CVE-2026-68923","PYSEC-2026-3688"],"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\n\n