VAITP Dataset

← Back to the dataset

CVE-2026-113613

Path traversal in FlexGet decompress plugin allows arbitrary file write via crafted archives.

  • CVSS 9.2
  • CWE-22
  • Input Validation and Sanitization
  • Remote

FlexGet before 3.20.7 contains a path traversal vulnerability in the decompress plugin that allows remote attackers to write arbitrary files by supplying malicious archive member paths. Attackers can deliver zip or rar archives with ../ sequences or absolute paths through a feed, writing Python files into the plugins directory for code execution.

CVSS base score
9.2
Published
2026-10-20
OWASP
A04 Insecure Design
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Input Validation and Sanitization
Subcategory
Path Traversal
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
FlexGet
Fixed by upgrading
Yes

Solution

Upgrade FlexGet to version 3.20.7 or later.

Vulnerable code sample

import os
import zipfile
from pathlib import Path

def extract_archive(archive_path: str, dest_dir: str) -> None:
    """Extract a zip archive to dest_dir (vulnerable)."""
    with zipfile.ZipFile(archive_path, 'r') as zf:
        for member in zf.infolist():
            # VULNERABLE: extracts member paths without validation, allowing ../ traversal
            target_path = os.path.join(dest_dir, member.filename)
            os.makedirs(os.path.dirname(target_path), exist_ok=True)
            with open(target_path, 'wb') as out_fp:
                out_fp.write(zf.read(member))

Patched code sample

import os
import zipfile
from pathlib import Path

def extract_archive(archive_path: str, dest_dir: str) -> None:
    """Extract a zip archive to dest_dir (fixed)."""
    dest_path = Path(dest_dir).resolve()
    with zipfile.ZipFile(archive_path, 'r') as zf:
        for member in zf.infolist():
            # FIX: reject paths that would escape dest_dir
            member_path = Path(member.filename)
            if member_path.is_absolute() or ".." in member_path.parts:
                continue
            target_path = (dest_path / member_path).resolve()
            if not str(target_path).startswith(str(dest_path)):
                continue
            os.makedirs(target_path.parent, exist_ok=True)
            with open(target_path, 'wb') as out_fp:
                out_fp.write(zf.read(member))

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

Cite this entry

@misc{vaitp:cve2026113613,
  title        = {{Path traversal in FlexGet decompress plugin allows arbitrary file write via crafted archives.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-113613},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-113613/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.