Wysoka

Mobile Security Framework (MobSF) has a Zip Slip Vulnerability in .a Static Library Files

  • Ujawniono: 19.08.2024
  • Aktualizacja: 11.10.2026 13:19

Summary

Upon reviewing the MobSF source code, I identified a flaw in the Static Libraries analysis section. Specifically, during the extraction of .a extension files, the measure intended to prevent Zip Slip attacks is improperly implemented.

Since the implemented measure can be bypassed, the vulnerability allows an attacker to extract files to any desired location within the server running MobSF.

Details

Upon examining lines 183-192 of the mobsf/StaticAnalyzer/views/common/shared_func.py file, it is observed that there is a mitigation against Zip Slip attacks implemented as a.decode('utf-8', 'ignore').replace('../', '').replace('..\\', ''). However, this measure can be bypassed using sequences like ....//....//....//. Since the replace operation is not recursive, this sequence is transformed into ../../../ after the replace operation, allowing files to be written to upper directories.

<img width="448" alt="image" src="https://github.com/user-attachments/assets/fadf4bcc-1a92-4655-b66a-5349278ad9c5">

For the proof of concept, I created an .a archive file that renders MobSF unusable by writing an empty file with the same name over the database located at /home/mobsf/.MobSF/db.sqlite3.

<img width="300" alt="poc a_1" src="https://github.com/user-attachments/assets/54acf101-3931-401f-9970-a0934265eecb">

I am including the binary used for the POC named poc.VULN. To test it, you need to rename this binary to poc.a.

Warning: As soon as you scan this file with MobSF, the database will be deleted, rendering MobSF unusable.

PoC Binary File (poc.VULN)

PoC

https://github.com/user-attachments/assets/3225ccb0-cb00-47a5-8305-37a40ca1ae7f

Impact

When a malicious .a file is scanned with MobSF, a critical vulnerability is present as it allows files to be extracted to any location on the server where MobSF is running. In this POC, I deleted the database, but it is also possible to achieve RCE by overwriting binaries of certain tools or by overwriting the /etc/passwd file.

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Python (PyPI) mobsf < 4.0.7 4.0.7

Odnośniki

Ocena CVSS 8/10
Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
Słabość (CWE)
CWE-22, CWE-23
Platforma
Python (PyPI)
Paczka
mobsf
Ujawniono
19.08.2024
Aktualizacja
11.10.2026 13:19

Źródła i licencje

OSV / GitHub Advisory Database - PYSEC-2026-1665 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-4hh3-vj32-gr6j - CC BY 4.0

Historia podatności: mobsf

Wszystkie opisane podatności tej paczki (Python (PyPI)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (22) w archiwum
Wszystkich wpisów
22
Pierwsza → ostatnia
10.2022 08.2026
Bez poprawki
1
Wykorzystywana w atakach
0

Rozkład istotności

  • Wysoka 9
  • Średnia 11
  • Niska 2

Ujawnienia w latach

  1. 2022: 1
  2. 2023: 1
  3. 2024: 6
  4. 2025: 8
  5. 2026: 6
Istotność:
  1. Wysoka · 8.1 CVE-2026-24490 < 4.4.5 4.4.5
  2. Wysoka · 6.5 CVE-2025-24805 < 4.3.1 4.3.1
  3. Wysoka · 6.5 CVE-2025-24804 < 4.3.1 4.3.1
  4. Wysoka · 8.1 CVE-2025-24803 < 4.3.1 4.3.1
  5. Mobile Security Framework (MobSF) has a Zip Slip Vulnerability in .a Static Library Files ten wpis
    Wysoka · 8.0 CVE-2024-43399 < 4.0.7 4.0.7
  6. Wysoka · 7.3 CVE-2024-29190 < 3.9.7 3.9.7

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.