CVE-2026-33332
NiceGUI's unvalidated chunk size parameter in media routes can cause memory exhaustion
描述
## Summary NiceGUI's `app.add_media_file()` and `app.add_media_files()` media routes accept a user-controlled query parameter that influences how files are read during streaming. The parameter is passed to the range-response implementation without validation, allowing an attacker to bypass chunked streaming and force the server to load entire files into memory at once. With large media files and concurrent requests, this can lead to excessive memory consumption, degraded performance, or denial of service. ## Impact **Affected applications:** NiceGUI applications that serve media content via `app.add_media_file()` or `app.add_media_files()`, particularly those serving large files (video, audio). **What an attacker can do:** - Force the server to load entire files into memory instead of streaming them in chunks - Amplify memory usage with concurrent requests to large media files - Cause performance degradation, memory pressure, and potential OOM conditions **Attack difficulty:** Low - requires only a crafted query parameter. ## Remediation Upgrade to a patched version of NiceGUI. As a workaround, restrict access to media endpoints or strip unexpected query parameters at a reverse proxy layer.
如何修補 CVE-2026-33332
要修補 CVE-2026-33332,請將受影響套件升級到下列已修補版本。
- —升級至 3.9.0 或更新版本
- —升級至 3.9.0 或更新版本
CVE-2026-33332 正在被利用嗎?
低 — EPSS 為 0.6%,目前沒有觀察到大規模利用活動。
受影響套件(2)
- from 0, < 3.9.0
- from 0, < 3.9.0