VAITP Dataset

← Back to the dataset

CVE-2026-77357

Denial‑of‑service via unbounded loop in /hot-reload endpoint (pre‑1.3.3).

  • CVSS 8.7
  • CWE-400
  • Resource Management
  • Remote

Mesop is a Python-based UI framework that allows users to build web applications. Prior to 1.3.3, applications running in debug mode expose a GET /hot-reload endpoint whose unbounded loop depends on the user-supplied counter parameter, allowing an unauthenticated attacker to hold worker threads with high counter values until the worker pool is exhausted and the server becomes unavailable. A single unauthenticated attacker can crash the Mesop server with minimal effort. Because the attack leverages worker exhaustion, the server remains unresponsive until it is manually restarted. This issue is fixed in version 1.3.3.

CVSS base score
8.7
Published
2026-08-25
OWASP
A05 Security Misconfiguration
Orthogonal defect classification
Timing/Serialization
Code defect classification
Timing Issues
Category
Resource Management
Subcategory
Resource Exhaustion
Accessibility scope
Remote
Impact
Denial of Service (DoS)
Affected component
Mesop
Fixed by upgrading
Yes

Solution

Upgrade Mesop to version 1.3.3 or newer.

Vulnerable code sample

import time
from flask import Flask, request, jsonify

app = Flask(__name__)
app.debug = True  # debug mode enables the hot‑reload endpoint

@app.route("/hot-reload")
def hot_reload():
    # VULNERABLE: unbounded loop uses attacker‑controlled counter
    counter = int(request.args.get("counter", "0"))
    i = 0
    while i < counter:
        time.sleep(0.1)  # simulate work per iteration
        i += 1
    return jsonify({"status": "done", "iterations": i})

Patched code sample

import time
from flask import Flask, request, jsonify

app = Flask(__name__)
app.debug = True  # debug mode enables the hot‑reload endpoint

@app.route("/hot-reload")
def hot_reload():
    # FIX: enforce a safe maximum on the attacker‑controlled counter
    raw_counter = int(request.args.get("counter", "0"))
    MAX_ITER = 100  # reasonable upper bound
    counter = min(raw_counter, MAX_ITER)
    i = 0
    while i < counter:
        time.sleep(0.1)  # simulate work per iteration
        i += 1
    return jsonify({"status": "done", "iterations": i})

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:cve202677357,
  title        = {{Denial‑of‑service via unbounded loop in /hot-reload endpoint (pre‑1.3.3).}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-77357},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-77357/}}
}

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.