nicegui
Affected
- introduced
0, fixed3.9.0(ecosystem)
Fixed versions
3.9.0
Fix
- Fixed version
3.9.0pip install --upgrade nicegui==3.9.0
Advisory
Also known as: CVE-2026-33332, PYSEC-2026-2233
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:
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.
Medium Basis: The source's own band: MODERATE
0, fixed 3.9.0 (ecosystem)3.9.0
3.9.0pip install --upgrade nicegui==3.9.0Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0