CVE-2025-58162
MobSF Vulnerable to Arbitrary File Write (AR-Slip) via Absolute Path in .a Extraction
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- High
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
6.5
MobSF Vulnerable to Arbitrary File Write (AR-Slip) via Absolute Path in .a Extraction
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.
- Record
CVE-2025-58162- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
EUVDEUVD-2025-26368
6.5
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.
- Record
EUVD-2025-26368- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-9gh8-9r95-3fc3
6.5
MobSF Vulnerable to Arbitrary File Write (AR-Slip) via Absolute Path in .a Extraction
Summary
The vulnerability allows any user to overwrite any files available under the account privileges of the running process.
Details
As part of static analysis, iOS MobSF supports loading and parsing statically linked libraries .a. When parsing such archives, the code extracts the embedded objects to the file system in the working directory of the analysis. The problem is that the current implementation does not prohibit absolute file names inside .a. If an archive item has a name like /abs/path/to/file, the resulting path is constructed as Path(dst) /name; for absolute paths, this leads to a complete substitution of the destination directory: writing occurs directly to the specified absolute directory. the path (outside the working directory).
Thus, an authenticated user who uploaded a specially prepared .a, can write arbitrary files to any directory writable by the user of the MobSF process (for example, /tmp, neighboring directories inside ~/.MobSF, etc.).
The key reason is that checking the "sliding" paths only takes into account the presence of .. (relative traversal), but does not take into account the absoluteness of the name and does not compare the normalized target path with the root directory of the extraction.
What exactly is vulnerable:
mobsf/StaticAnalyzer/views/common/shared_func.py
Function for extracting objects from .a — ar_extract
def ar_extract(checksum, src, dst):
"""Extract AR archive."""
...
ar = arpy.Archive(src)
ar.read_all_headers()
for a, val in ar.archived_files.items():
# Handle archive slip attacks
filtered = a.decode('utf-8', 'ignore')
if is_path_traversal(filtered):
msg = f'Zip slip detected. skipped extracting {filtered}'
logger.warning(msg)
append_scan_status(checksum, msg)
continue
out = Path(dst) / filtered
out.write_bytes(val.read())
- The “slip” check is limited to is_path_traversal(filtered), which looks only for traversal patterns like
..,%2e%2e,%252e. - Therefore, if the .a archive contains a member named '/tmp/pwned.txt', MobSF will write it to
/tmp/pwned.txt, outside the intended working directory.
ar_extract is called from: mobsf/StaticAnalyzer/views/common/a.py
def extract_n_get_files(checksum, src, dst):
dst = Path(dst) / 'static_objects'
dst.mkdir(parents=True, exist_ok=True)
ar_extract(checksum, src, dst.as_posix())
The expectation is that extraction happens only under the static_objects subdirectory, but absolute file names inside the .a break this assumption by directing writes outside that directory.
Attack Scenario
- The attacker creates a valid AR archive.a, in which the name of one of the members is the absolute path (as an example) /home/mobsf/.MobSF/db.sqlite3. This is done by the standard AR (GNU long filename table) mechanism.
- It downloads this one via the web interface or the Static library loading API
.ain MobSF. - During the analysis, MobSF extracts the contents: due to the absolute name, the resulting path becomes /home/mobsf/.MobSF/db.sqlite3, and the file is created/overwritten outside the working directory.
- In our case, the database file was overwritten, which caused MobSF to malfunction.
PoC
-
Using the script, create a file with the payload. In the example, this is "/home/mobsf/.MobSF/db.sqlite3" <img width="786" height="342" alt="image" src="https://github.com/user-attachments/assets/0b7aee5c-6938-45cc-b668-9ad19f48c2c5" />
-
Connect to the container and verify that the db.sqlite3 file is a database. The scan has not been performed yet. <img width="2535" height="1507" alt="image" src="https://github.com/user-attachments/assets/0cc92da7-91c0-453f-b1ed-080c9cfaa7f1" />
-
Upload the file for scanning and then update the page to get a server error. <img width="2559" height="1476" alt="image"…
- Record
GHSA-9gh8-9r95-3fc3- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
NVD
6.5
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.
- Record
CVE-2025-58162- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
OSV
6.5
MobSF Vulnerable to Arbitrary File Write (AR-Slip) via Absolute Path in .a Extraction
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.
- Record
CVE-2025-58162- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVGHSA-9gh8-9r95-3fc3
6.5
MobSF Vulnerable to Arbitrary File Write (AR-Slip) via Absolute Path in .a Extraction
Summary
The vulnerability allows any user to overwrite any files available under the account privileges of the running process.
Details
As part of static analysis, iOS MobSF supports loading and parsing statically linked libraries .a. When parsing such archives, the code extracts the embedded objects to the file system in the working directory of the analysis. The problem is that the current implementation does not prohibit absolute file names inside .a. If an archive item has a name like /abs/path/to/file, the resulting path is constructed as Path(dst) /name; for absolute paths, this leads to a complete substitution of the destination directory: writing occurs directly to the specified absolute directory. the path (outside the working directory).
Thus, an authenticated user who uploaded a specially prepared .a, can write arbitrary files to any directory writable by the user of the MobSF process (for example, /tmp, neighboring directories inside ~/.MobSF, etc.).
The key reason is that checking the "sliding" paths only takes into account the presence of .. (relative traversal), but does not take into account the absoluteness of the name and does not compare the normalized target path with the root directory of the extraction.
What exactly is vulnerable:
mobsf/StaticAnalyzer/views/common/shared_func.py
Function for extracting objects from .a — ar_extract
def ar_extract(checksum, src, dst):
"""Extract AR archive."""
...
ar = arpy.Archive(src)
ar.read_all_headers()
for a, val in ar.archived_files.items():
# Handle archive slip attacks
filtered = a.decode('utf-8', 'ignore')
if is_path_traversal(filtered):
msg = f'Zip slip detected. skipped extracting {filtered}'
logger.warning(msg)
append_scan_status(checksum, msg)
continue
out = Path(dst) / filtered
out.write_bytes(val.read())
- The “slip” check is limited to is_path_traversal(filtered), which looks only for traversal patterns like
..,%2e%2e,%252e. - Therefore, if the .a archive contains a member named '/tmp/pwned.txt', MobSF will write it to
/tmp/pwned.txt, outside the intended working directory.
ar_extract is called from: mobsf/StaticAnalyzer/views/common/a.py
def extract_n_get_files(checksum, src, dst):
dst = Path(dst) / 'static_objects'
dst.mkdir(parents=True, exist_ok=True)
ar_extract(checksum, src, dst.as_posix())
The expectation is that extraction happens only under the static_objects subdirectory, but absolute file names inside the .a break this assumption by directing writes outside that directory.
Attack Scenario
- The attacker creates a valid AR archive.a, in which the name of one of the members is the absolute path (as an example) /home/mobsf/.MobSF/db.sqlite3. This is done by the standard AR (GNU long filename table) mechanism.
- It downloads this one via the web interface or the Static library loading API
.ain MobSF. - During the analysis, MobSF extracts the contents: due to the absolute name, the resulting path becomes /home/mobsf/.MobSF/db.sqlite3, and the file is created/overwritten outside the working directory.
- In our case, the database file was overwritten, which caused MobSF to malfunction.
PoC
-
Using the script, create a file with the payload. In the example, this is "/home/mobsf/.MobSF/db.sqlite3" <img width="786" height="342" alt="image" src="https://github.com/user-attachments/assets/0b7aee5c-6938-45cc-b668-9ad19f48c2c5" />
-
Connect to the container and verify that the db.sqlite3 file is a database. The scan has not been performed yet. <img width="2535" height="1507" alt="image" src="https://github.com/user-attachments/assets/0cc92da7-91c0-453f-b1ed-080c9cfaa7f1" />
-
Upload the file for scanning and then update the page to get a server error. <img width="2559" height="1476" alt="image"…
- Record
GHSA-9gh8-9r95-3fc3- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVPYSEC-2026-1670
6.5
MobSF Vulnerable to Arbitrary File Write (AR-Slip) via Absolute Path in .a Extraction
Summary
The vulnerability allows any user to overwrite any files available under the account privileges of the running process.
Details
As part of static analysis, iOS MobSF supports loading and parsing statically linked libraries .a. When parsing such archives, the code extracts the embedded objects to the file system in the working directory of the analysis. The problem is that the current implementation does not prohibit absolute file names inside .a. If an archive item has a name like /abs/path/to/file, the resulting path is constructed as Path(dst) /name; for absolute paths, this leads to a complete substitution of the destination directory: writing occurs directly to the specified absolute directory. the path (outside the working directory).
Thus, an authenticated user who uploaded a specially prepared .a, can write arbitrary files to any directory writable by the user of the MobSF process (for example, /tmp, neighboring directories inside ~/.MobSF, etc.).
The key reason is that checking the "sliding" paths only takes into account the presence of .. (relative traversal), but does not take into account the absoluteness of the name and does not compare the normalized target path with the root directory of the extraction.
What exactly is vulnerable:
mobsf/StaticAnalyzer/views/common/shared_func.py
Function for extracting objects from .a — ar_extract
def ar_extract(checksum, src, dst):
"""Extract AR archive."""
...
ar = arpy.Archive(src)
ar.read_all_headers()
for a, val in ar.archived_files.items():
# Handle archive slip attacks
filtered = a.decode('utf-8', 'ignore')
if is_path_traversal(filtered):
msg = f'Zip slip detected. skipped extracting {filtered}'
logger.warning(msg)
append_scan_status(checksum, msg)
continue
out = Path(dst) / filtered
out.write_bytes(val.read())
- The “slip” check is limited to is_path_traversal(filtered), which looks only for traversal patterns like
..,%2e%2e,%252e. - Therefore, if the .a archive contains a member named '/tmp/pwned.txt', MobSF will write it to
/tmp/pwned.txt, outside the intended working directory.
ar_extract is called from: mobsf/StaticAnalyzer/views/common/a.py
def extract_n_get_files(checksum, src, dst):
dst = Path(dst) / 'static_objects'
dst.mkdir(parents=True, exist_ok=True)
ar_extract(checksum, src, dst.as_posix())
The expectation is that extraction happens only under the static_objects subdirectory, but absolute file names inside the .a break this assumption by directing writes outside that directory.
Attack Scenario
- The attacker creates a valid AR archive.a, in which the name of one of the members is the absolute path (as an example) /home/mobsf/.MobSF/db.sqlite3. This is done by the standard AR (GNU long filename table) mechanism.
- It downloads this one via the web interface or the Static library loading API
.ain MobSF. - During the analysis, MobSF extracts the contents: due to the absolute name, the resulting path becomes /home/mobsf/.MobSF/db.sqlite3, and the file is created/overwritten outside the working directory.
- In our case, the database file was overwritten, which caused MobSF to malfunction.
PoC
-
Using the script, create a file with the payload. In the example, this is "/home/mobsf/.MobSF/db.sqlite3" <img width="786" height="342" alt="image" src="https://github.com/user-attachments/assets/0b7aee5c-6938-45cc-b668-9ad19f48c2c5" />
-
Connect to the container and verify that the db.sqlite3 file is a database. The scan has not been performed yet. <img width="2535" height="1507" alt="image" src="https://github.com/user-attachments/assets/0cc92da7-91c0-453f-b1ed-080c9cfaa7f1" />
-
Upload the file for scanning and then update the page to get a server error. <img width="2559" height="1476" alt="image"…
- Record
PYSEC-2026-1670- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H - Updated
- 2026-11-02
Affected products
Affected packages
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-58162 is a medium vulnerability (CVSS 6.5) in Mobsf Mobile-security-framework-mobsf, published September 2, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.59%, the 48th percentile. Fixed in mobsf 4.4.1.
References
github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-9gh8-9r95-3fc3
github.com/MobSF/Mobile-Security-Framework-MobSF/commit/7f3bc086c028c1b50889cab8a15f7b59b7abdaf9
github.com/MobSF/Mobile-Security-Framework-MobSF/releases/tag/v4.4.1
github.com/advisories/GHSA-9gh8-9r95-3fc3
github.com/CVEProject/cvelistV5/tree/main/cves/2025/58xxx/CVE-2025-58162.json
nvd.nist.gov/vuln/detail/CVE-2025-58162
github.com/MobSF/Mobile-Security-Framework-MobSF
pypi.org/project/mobsf
Left out here: the rest of 3 source descriptions. The JSON record has them.