MobSF Path Traversal Vulnerability in File Download Route

Vulnerability

A path traversal vulnerability has been identified in MobSF version 4.4.0. The issue arises in the GET /download/ route, where string path verification is performed using os.path.commonprefix. This flaw allows an authenticated user to download files from sibling directories adjacent to the DWD_DIR download directory, as long as the absolute paths of those directories share the same prefix as DWD_DIR. The vulnerability can lead to unauthorized access to sensitive files, creating a data leak.

Impact

Exploitation of this vulnerability allows authenticated users to download files from directories adjacent to the designated download directory, potentially leading to unauthorized access to sensitive information.

Reproduction

To reproduce this vulnerability, an authenticated user can send a GET request to the /download/ route with an absolute path that points to a file in a sibling directory of the DWD_DIR. The request must include a session cookie to authenticate the user. The server will respond with the requested file if the path traversal is successful.

Remediation

Users can upgrade to MobSF version 4.4.1, where this vulnerability has been patched.

Added: Sep 2, 2025, 1:21 AM
Updated: Sep 2, 2025, 1:21 AM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
6.6
remediation
7.7
relevance
0.4
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.