Security context

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

pallets/flask
main @ 36e4a82
4
Fixes
4
CVEs
HIGH
Peak severity
50.0%
Coverage
Highlights
Path Traversal: 2 prior fixes. Scrutinize any change in this area.
flask/helpers.py: most-fixed (2 issues). Treat as high-risk during review.
2 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: The helper utilities designed to serve static files safely can be bypassed on specific operating systems or with malformed inputs if canonicalization checks are incomplete. Specifically, Windows path separators and edge-case relative directory names ('..') historically bypassed security controls in safe_join and send_from_directory.
Auth Bypass: Misordering of cryptographic keys when rotating fallback secrets can result in session validation using weaker or outdated keys, exposing the application to authentication bypass or session forging when interacting with URLSafeTimedSerializer.
Reflected XSS: Improper output escaping within default filters like tojson can allow attackers to inject malicious markup, such as unescaped forward slashes that close script tags, leading to client-side code execution.