VAITP Dataset

← Back to the dataset

CVE-2026-75597

Unauthenticated Jinja2 template access leaks vars and template names.

  • CVSS 5.3
  • CWE-209
  • Information Leakage
  • Remote

pyLoad is a free and open-source download manager written in Python. Prior to 0.5.0b3.dev101, the `/web/<path:filename>` route in `src/pyload/webui/app/blueprints/app_blueprint.py` renders Jinja2 templates without any authentication requirement. Every equivalent direct route (`/logs`, `/settings`, `/queue`, `/dashboard`, etc.) is protected by `@login_required`, but the underlying templates for all of these pages are accessible unauthenticated via this endpoint. Combined with an exception attribute typo in `src/pyload/webui/app/handlers.py` (`exc.desc` instead of `exc.description`), internal Jinja2 variable names are leaked in HTTP 500 response bodies to unauthenticated callers. An attacker can also enumerate all valid template names by observing 200 vs 500 response differentiation. Version 0.5.0b3.dev101 contains a patch.

CVSS base score
5.3
Published
2026-10-09
OWASP
A01 Broken Access Control
Orthogonal defect classification
Interface
Code defect classification
Missing Interface
Category
Information Leakage
Subcategory
Information Disclosure
Accessibility scope
Remote
Impact
Information Disclosure
Affected component
Python

Solution

Upgrade pyLoad to version 0.5.0b3.dev101 or later.

Vulnerable code sample

from flask import Blueprint, render_template, abort, request
from flask_login import current_user
import jinja2

app_blueprint = Blueprint('app', __name__)

@app_blueprint.route('/web/<path:filename>')
# VULNERABLE: unauthenticated template rendering leads to info disclosure
def serve_template(filename):
    try:
        # Directly render any template under templates/ without auth
        return render_template(f"{filename}.html")
    except jinja2.exceptions.TemplateError as exc:
        # Typo leaks internal variable name in 500 response
        abort(500, description=exc.desc)

@app_blueprint.route('/dashboard')
def dashboard():
    if not current_user.is_authenticated:
        abort(401)
    return render_template("dashboard.html")

Patched code sample

from flask import Blueprint, render_template, abort, request
from flask_login import current_user, login_required
import jinja2

app_blueprint = Blueprint('app', __name__)

@app_blueprint.route('/web/<path:filename>')
# FIX: enforce authentication and correct exception attribute
@login_required
def serve_template(filename):
    try:
        return render_template(f"{filename}.html")
    except jinja2.exceptions.TemplateError as exc:
        abort(500, description=exc.description)

@app_blueprint.route('/dashboard')
@login_required
def dashboard():
    return render_template("dashboard.html")

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:cve202675597,
  title        = {{Unauthenticated Jinja2 template access leaks vars and template names.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-75597},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-75597/}}
}

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.