CVE-2025-58162: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in MobSF Mobile-Security-Framework-MobSF
MobSF is a mobile application security testing tool used. In version 4.4.0, an authenticated user who uploaded a specially prepared one.a, can write arbitrary files to any directory writable by the user of the MobSF process. This issue has been patched in version 4.4.1.
AI Analysis
Technical Summary
CVE-2025-58162 is a path traversal vulnerability (CWE-22) identified in version 4.4.0 of the Mobile-Security-Framework (MobSF), a widely used tool for mobile application security testing. This vulnerability allows an authenticated user to upload a specially crafted file named 'one.a' that exploits improper limitation of pathname to restricted directories. Specifically, the flaw enables the attacker to write arbitrary files to any directory writable by the user account under which the MobSF process runs. Because MobSF typically operates with user-level permissions, the attacker can potentially overwrite or create files in sensitive locations accessible to that user, leading to integrity and availability impacts. The vulnerability requires authentication but no user interaction beyond the upload of the malicious file. The CVSS v3.1 base score is 6.5 (medium severity), reflecting network attack vector, low attack complexity, high privileges required, no user interaction, unchanged scope, no confidentiality impact, but high integrity and availability impacts. The issue was patched in MobSF version 4.4.1, and no known exploits are reported in the wild as of the publication date. The vulnerability arises from insufficient validation and sanitization of file paths during upload processing, allowing directory traversal sequences to escape intended directories and write files arbitrarily. This can be leveraged to overwrite configuration files, inject malicious scripts, or disrupt the operation of MobSF or the host system, potentially compromising the security testing environment and any data processed within it.
Potential Impact
For European organizations using MobSF 4.4.0, this vulnerability poses a significant risk to the integrity and availability of their mobile security testing infrastructure. An attacker with valid credentials could exploit this flaw to manipulate files on the server, potentially injecting malicious code or disrupting security assessments. This could lead to inaccurate security testing results, undermining the organization's mobile application security posture. Additionally, if MobSF is integrated into CI/CD pipelines or used in environments with sensitive data, the ability to write arbitrary files could facilitate further attacks or data corruption. The lack of confidentiality impact reduces the risk of direct data leakage, but the integrity and availability impacts can cause operational disruptions and loss of trust in security processes. European organizations relying on MobSF for compliance or regulatory assessments may face challenges meeting security standards if this vulnerability is exploited. The requirement for authentication limits exposure to internal or trusted users, but insider threats or compromised credentials could still enable exploitation.
Mitigation Recommendations
Organizations should immediately upgrade MobSF installations to version 4.4.1 or later, where this vulnerability is patched. If upgrading is not immediately feasible, restrict access to MobSF to trusted administrators and enforce strong authentication controls to minimize the risk of credential compromise. Implement strict file system permissions to limit the directories writable by the MobSF process user, reducing the potential impact of arbitrary file writes. Additionally, monitor file system changes in directories accessible to MobSF for unusual activity. Employ network segmentation to isolate MobSF servers from broader enterprise networks, limiting attacker lateral movement if exploited. Regularly audit and review user accounts with MobSF access to ensure only necessary personnel have privileges. Finally, consider deploying application-level monitoring or intrusion detection systems to detect anomalous file uploads or path traversal attempts targeting MobSF.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Poland
CVE-2025-58162: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in MobSF Mobile-Security-Framework-MobSF
Description
MobSF is a mobile application security testing tool used. In version 4.4.0, an authenticated user who uploaded a specially prepared one.a, can write arbitrary files to any directory writable by the user of the MobSF process. This issue has been patched in version 4.4.1.
AI-Powered Analysis
Technical Analysis
CVE-2025-58162 is a path traversal vulnerability (CWE-22) identified in version 4.4.0 of the Mobile-Security-Framework (MobSF), a widely used tool for mobile application security testing. This vulnerability allows an authenticated user to upload a specially crafted file named 'one.a' that exploits improper limitation of pathname to restricted directories. Specifically, the flaw enables the attacker to write arbitrary files to any directory writable by the user account under which the MobSF process runs. Because MobSF typically operates with user-level permissions, the attacker can potentially overwrite or create files in sensitive locations accessible to that user, leading to integrity and availability impacts. The vulnerability requires authentication but no user interaction beyond the upload of the malicious file. The CVSS v3.1 base score is 6.5 (medium severity), reflecting network attack vector, low attack complexity, high privileges required, no user interaction, unchanged scope, no confidentiality impact, but high integrity and availability impacts. The issue was patched in MobSF version 4.4.1, and no known exploits are reported in the wild as of the publication date. The vulnerability arises from insufficient validation and sanitization of file paths during upload processing, allowing directory traversal sequences to escape intended directories and write files arbitrarily. This can be leveraged to overwrite configuration files, inject malicious scripts, or disrupt the operation of MobSF or the host system, potentially compromising the security testing environment and any data processed within it.
Potential Impact
For European organizations using MobSF 4.4.0, this vulnerability poses a significant risk to the integrity and availability of their mobile security testing infrastructure. An attacker with valid credentials could exploit this flaw to manipulate files on the server, potentially injecting malicious code or disrupting security assessments. This could lead to inaccurate security testing results, undermining the organization's mobile application security posture. Additionally, if MobSF is integrated into CI/CD pipelines or used in environments with sensitive data, the ability to write arbitrary files could facilitate further attacks or data corruption. The lack of confidentiality impact reduces the risk of direct data leakage, but the integrity and availability impacts can cause operational disruptions and loss of trust in security processes. European organizations relying on MobSF for compliance or regulatory assessments may face challenges meeting security standards if this vulnerability is exploited. The requirement for authentication limits exposure to internal or trusted users, but insider threats or compromised credentials could still enable exploitation.
Mitigation Recommendations
Organizations should immediately upgrade MobSF installations to version 4.4.1 or later, where this vulnerability is patched. If upgrading is not immediately feasible, restrict access to MobSF to trusted administrators and enforce strong authentication controls to minimize the risk of credential compromise. Implement strict file system permissions to limit the directories writable by the MobSF process user, reducing the potential impact of arbitrary file writes. Additionally, monitor file system changes in directories accessible to MobSF for unusual activity. Employ network segmentation to isolate MobSF servers from broader enterprise networks, limiting attacker lateral movement if exploited. Regularly audit and review user accounts with MobSF access to ensure only necessary personnel have privileges. Finally, consider deploying application-level monitoring or intrusion detection systems to detect anomalous file uploads or path traversal attempts targeting MobSF.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-08-27T13:34:56.186Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68b64234ad5a09ad00d5f96d
Added to database: 9/2/2025, 1:02:44 AM
Last enriched: 9/2/2025, 1:17:53 AM
Last updated: 10/17/2025, 2:34:25 AM
Views: 45
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-23073: CWE-200 Exposure of Sensitive Information to an Unauthorized Actor in Wikimedia Foundation Mediawiki - GlobalBlocking Extension
LowCVE-2025-62504: CWE-416: Use After Free in envoyproxy envoy
MediumCVE-2025-11864: Server-Side Request Forgery in NucleoidAI Nucleoid
MediumCVE-2024-42192: CWE-522 Insufficiently Protected Credentials in HCL Software Traveler for Microsoft Outlook
MediumCVE-2025-60358: n/a
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.