python-engineio, Denial of Service (Unbound Thread Allocation), GSA_kwCzR0hTQS1jZ3djLXB2NDgtZmhqNc4ABZnY (Medium) -DC-Jun2026-705

Listen to this Post

How the Vulnerability Works

The python-engineio server implements a heartbeat mechanism to maintain active connections. Under normal operation, when a new client connects and passes authentication, the server spawns a background thread (or asynchronous task) to manage heartbeat exchanges—periodic PING/PONG packets that keep the connection alive.
The vulnerability arises because the server did not enforce any limits on thread creation. An attacker can exploit this in two ways:
1. By initiating many new connections – each connection attempt triggers the launch of a heartbeat thread, even before authentication is fully verified.
2. By sending crafted PONG packets – the server would spawn a new heartbeat thread every time it received a PONG packet from a client, regardless of whether an active heartbeat thread already existed for that client.
Because the server did not check for existing threads or limit the total number of threads, a remote attacker could flood the server with connection requests and PONG packets. This causes the server to allocate an unbounded number of background threads, rapidly consuming system memory and CPU. Eventually, the server becomes unresponsive, leading to a denial‑of‑service condition.
This issue is most severe for synchronous servers (e.g., those using the default `threading` async mode), where each background task is a physical operating system thread. Asynchronous servers (e.g., using `eventlet` or gevent) are less affected because they use lightweight greenlets or tasks, but the fix was still applied to them as a precaution.
The problem was addressed in version 4.13.2 with two key changes:
– The initial heartbeat thread is now only launched after the client has successfully passed authentication in the `connect` handler.
– The server ensures that only one heartbeat thread exists per client at any time; out‑of‑sequence PONG packets are discarded if a heartbeat thread is already running.

DailyCVE Form

Platform: ……. python-engineio
Version: …….. <= 4.13.1
Vulnerability :…… Unbound thread allocation (CWE‑770)
Severity: ……. Medium (CVSS 4.0: 7.5)
date: ………. 2026‑05‑25

Prediction: ….. 2026‑05‑26 (patch released in v4.13.2)

What Undercode Say – Analytics

Check installed version:

pip show python-engineio | grep Version

Simulate a simple attack (Python):

import socketio
import threading
Create many clients that send PONG packets repeatedly
def flood_pongs():
sio = socketio.Client()
sio.connect('http://target:5000')
while True:
sio.emit('pong') triggers heartbeat thread creation
for _ in range(100):
threading.Thread(target=flood_pongs).start()

Monitor thread count on the server:

watch -n 1 "ps -eLf | grep python | wc -l"

Check for the fix in source code (commit 441):

git show 441 --stat

Exploit

An attacker with network access to a vulnerable python-engineio server can:
1. Send multiple connection requests – each request triggers a new heartbeat thread before authentication.
2. Send out‑of‑sequence PONG packets – each PONG spawns an additional thread even if one already exists.
3. Combine both techniques to exhaust system resources quickly.
The attack requires no special privileges and can be performed from a single machine with minimal bandwidth, making it a low‑cost, high‑impact DoS vector.

Protection

  • Upgrade to python-engineio version 4.13.2 or later immediately.
  • If upgrading is not possible, apply the patch from commit `441` manually.
  • Restrict network access to the Engine.IO endpoint using a firewall or reverse proxy to limit exposure to trusted clients only.
  • Monitor thread/process counts and set up alerts for abnormal spikes in background threads.

Impact

  • Denial of Service – the server becomes unresponsive due to resource exhaustion.
  • Service disruption – legitimate clients are unable to connect or maintain sessions.
  • Resource waste – CPU and memory are consumed by idle heartbeat threads, degrading overall system performance.
  • Wide applicability – affects all synchronous deployments of python-engineio prior to 4.13.2; asynchronous deployments are less impacted but still vulnerable in theory.

🎯Let’s Practice Exploiting & Learn Patching For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top