GHSA-W5G8-5849-VJ76
Vulnerability from github – Published: 2026-03-19 18:48 – Updated: 2026-03-27 21:57Summary
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.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 3.8.0"
},
"package": {
"ecosystem": "PyPI",
"name": "nicegui"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.9.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-33332"
],
"database_specific": {
"cwe_ids": [
"CWE-20",
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-19T18:48:27Z",
"nvd_published_at": "2026-03-24T20:16:28Z",
"severity": "MODERATE"
},
"details": "## Summary\n\nNiceGUI\u0027s `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.\n\nWith large media files and concurrent requests, this can lead to excessive memory consumption, degraded performance, or denial of service.\n\n## Impact\n\n**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).\n\n**What an attacker can do:**\n- Force the server to load entire files into memory instead of streaming them in chunks\n- Amplify memory usage with concurrent requests to large media files\n- Cause performance degradation, memory pressure, and potential OOM conditions\n\n**Attack difficulty:** Low - requires only a crafted query parameter.\n\n## Remediation\n\nUpgrade to a patched version of NiceGUI.\n\nAs a workaround, restrict access to media endpoints or strip unexpected query parameters at a reverse proxy layer.",
"id": "GHSA-w5g8-5849-vj76",
"modified": "2026-03-27T21:57:40Z",
"published": "2026-03-19T18:48:27Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/zauberzeug/nicegui/security/advisories/GHSA-w5g8-5849-vj76"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33332"
},
{
"type": "WEB",
"url": "https://github.com/zauberzeug/nicegui/commit/9026962b8c4f3f225c98b2fbc35aa6b60cb3495b"
},
{
"type": "PACKAGE",
"url": "https://github.com/zauberzeug/nicegui"
},
{
"type": "WEB",
"url": "https://github.com/zauberzeug/nicegui/releases/tag/v3.9.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
"type": "CVSS_V3"
},
{
"score": "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",
"type": "CVSS_V4"
}
],
"summary": "NiceGUI\u0027s unvalidated chunk size parameter in media routes can cause memory exhaustion"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.