VAITP Dataset

← Back to the dataset

CVE-2026-48484

Unbounded memory consumption via multipart upload leading to DoS.

  • CVSS 6.5
  • CWE-20
  • Resource Management
  • Remote

pyLoad is a free and open-source download manager written in Python. Prior to 0.5.0b3.dev101, the API `rpc` function in `api_blueprint.py` handles `multipart/form-data` uploads by reading the whole content of the uploaded file into memory with `file.read()`. This occurs before the data is sent to the underlying function. Since there is no size limit set at this point, a large file upload can exhaust the server's available memory which led to process termination. Version 0.5.0b3.dev101 contains a patch.

CVSS base score
6.5
Published
2026-10-09
OWASP
A04 Insecure Design
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Resource Management
Subcategory
Resource Exhaustion
Accessibility scope
Remote
Impact
Denial of Service (DoS)
Affected component
pyLoad
Fixed by upgrading
Yes

Solution

Upgrade pyLoad to version 0.5.0b3.dev101.

Vulnerable code sample

from flask import Blueprint, request, jsonify

api = Blueprint('api', __name__)

@api.route('/rpc', methods=['POST'])
def rpc():
    # VULNERABLE: reads entire uploaded file into memory
    uploaded = request.files.get('file')
    if not uploaded:
        return jsonify({'error': 'no file'}), 400
    data = uploaded.read()  # whole file loaded
    # Pass data to downstream processing (placeholder)
    result = process_payload(data)
    return jsonify({'status': 'ok', 'result': result})

def process_payload(blob):
    # placeholder for actual RPC handling
    return len(blob)

Patched code sample

from flask import Blueprint, request, jsonify
from werkzeug.utils import secure_filename
import os

api = Blueprint('api', __name__)

MAX_UPLOAD_SIZE = 10 * 1024 * 1024  # 10 MB

@api.route('/rpc', methods=['POST'])
def rpc():
    # FIX: stream file and enforce size limit
    uploaded = request.files.get('file')
    if not uploaded:
        return jsonify({'error': 'no file'}), 400
    filename = secure_filename(uploaded.filename)
    temp_path = os.path.join('/tmp', filename)
    total = 0
    with open(temp_path, 'wb') as f:
        while True:
            chunk = uploaded.stream.read(8192)
            if not chunk:
                break
            total += len(chunk)
            if total > MAX_UPLOAD_SIZE:
                f.close()
                os.remove(temp_path)
                return jsonify({'error': 'file too large'}), 413
            f.write(chunk)
    with open(temp_path, 'rb') as f:
        data = f.read()
    os.remove(temp_path)
    result = process_payload(data)
    return jsonify({'status': 'ok', 'result': result})

def process_payload(blob):
    # placeholder for actual RPC handling
    return len(blob)

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:cve202648484,
  title        = {{Unbounded memory consumption via multipart upload leading to DoS.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-48484},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-48484/}}
}

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.