NiceGUI's unvalidated chunk size parameter in media routes can cause memory exhaustion
Description
NiceGUI is a Python-based UI framework. Prior to version 3.9.0, 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. This issue has been patched in version 3.9.0.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
niceguiPyPI | < 3.9.0 | 3.9.0 |
Affected products
2- Range: < 3.9.0
Patches
Vulnerability mechanics
References
5- github.com/advisories/GHSA-w5g8-5849-vj76ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-33332ghsaADVISORY
- github.com/zauberzeug/nicegui/commit/9026962b8c4f3f225c98b2fbc35aa6b60cb3495bghsax_refsource_MISCWEB
- github.com/zauberzeug/nicegui/releases/tag/v3.9.0ghsax_refsource_MISCWEB
- github.com/zauberzeug/nicegui/security/advisories/GHSA-w5g8-5849-vj76ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.