Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

zauberzeug/nicegui
main @ 15b027c
65
Fixes
12
CVEs
HIGH
Peak severity
61.1%
Coverage
Highlights
Denial of Service: 23 prior fixes. Scrutinize any change in this area.
nicegui/nicegui.py: most-fixed (10 issues). Treat as high-risk during review.
34 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Path Traversal: Insecure handling of user-supplied filenames on Windows systems allowed path traversal because sanitization was not backslash-aware. Developers must use strict sanitization when persisting uploaded files to prevent arbitrary file writes.
Cross-Site Scripting (XSS): Direct injection of serialized UI elements using unsafe template expressions enabled Reflected and DOM-based XSS inside client-side templates. All dynamic content must be explicitly HTML-escaped and JSON-serialized prior to being rendered in browser templates.
Path Traversal: Static asset serving endpoints previously resolved dynamic file paths and routed them to FileResponse without validating that they remained within intended directories. Robust canonical path prefix-checks are critical when serving static resources.