Highlights
Auth Bypass: 7 prior fixes. Scrutinize any change in this area.
ninja/operation.py: most-fixed (3 issues). Treat as high-risk during review.
7 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.
Auth Bypass: Asynchronous authentication callbacks that were not correctly awaited returned coroutine objects, which evaluated to truthy values and bypassed authentication checks. Developers must ensure async callbacks are properly awaited before checking authentication status.
Auth Bypass: Falsy return values from authentication callbacks (such as False or empty lists/strings) were incorrectly validated, allowing unauthorized requests when the callback did not return None. A strict, explicit validation of the return value is required.
CSRF: Exempting all Django-Ninja views globally from Django's CSRF middleware (to allow flexible API design) delegates the security responsibility entirely to the authentication layers, leading to potential CSRF vulnerabilities if cookies are consumed without individual validation.