VAITP Dataset

← Back to the dataset

CVE-2026-52835

Path traversal in file upload allows overwriting files outside cache directory.

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

Tautulli is a Python based monitoring and tracking tool for Plex Media Server. Prior to 2.17.2, the import_config handler and the database_file branch of import_database in plexpy/webserve.py join the attacker-controlled config_file.filename or database_file.filename directly to CACHE_DIR without basename reduction or a containment check. An administrator or caller with the instance API key can submit a multipart filename containing parent-directory segments, causing the upload to be created or overwritten outside CACHE_DIR before file-content validation runs. The write is limited to paths permitted to the Tautulli process, but it can enable configuration tampering, service disruption, or code execution. This issue is fixed in version 2.17.2.

CVSS base score
7.0
Published
2026-09-21
OWASP
A08 Software and Data Integrity Failures
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
Tautulli

Solution

Upgrade Tautulli to version 2.17.2 or later.

Vulnerable code sample

import os
from flask import request, Blueprint, jsonify

webserve = Blueprint('webserve', __name__)
CACHE_DIR = '/var/tautulli/cache'

@webserve.route('/import_config', methods=['POST'])
def import_config():
    # VULNERABLE: path traversal via attacker‑controlled filename
    filename = request.files['config_file'].filename
    dest_path = os.path.join(CACHE_DIR, filename)  # no sanitisation
    with open(dest_path, 'wb') as f:
        f.write(request.files['config_file'].read())
    return jsonify({"status": "uploaded", "path": dest_path})

Patched code sample

import os
from flask import request, Blueprint, jsonify

webserve = Blueprint('webserve', __name__)
CACHE_DIR = '/var/tautulli/cache'

@webserve.route('/import_config', methods=['POST'])
def import_config():
    # FIX: strip path components and enforce containment
    filename = request.files['config_file'].filename
    safe_name = os.path.basename(filename)
    dest_path = os.path.join(CACHE_DIR, safe_name)
    dest_path = os.path.abspath(dest_path)
    if not dest_path.startswith(os.path.abspath(CACHE_DIR) + os.sep):
        return jsonify({"error": "invalid filename"}), 400
    with open(dest_path, 'wb') as f:
        f.write(request.files['config_file'].read())
    return jsonify({"status": "uploaded", "path": dest_path})

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:cve202652835,
  title        = {{Path traversal in file upload allows overwriting files outside cache directory.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-52835},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-52835/}}
}

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.