Highlights
Auth Bypass: 3 prior fixes. Scrutinize any change in this area.
swirl/authenticators/microsoft.py: most-fixed (3 issues). Treat as high-risk during review.
5 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.
Code Injection: The use of dangerous dynamic evaluation (eval) for dispatching commands and authenticators created a direct path to remote code execution. Developers must strictly use static lookup structures (such as dispatch tables) instead of dynamically evaluating input.
Auth Bypass: Multiple issues in the Microsoft OAuth implementation allowed token association with incorrect active sessions and permitted unauthenticated users to initiate flows. Correct implementation requires validating local authentication before initiating external flows and strictly binding received tokens to the active request user.
Privilege Escalation: Querying fallback credentials without enforcing ownership checks allowed cross-user Microsoft token exposure during identity provider user provisioning. Queries must explicitly restrict fallback lookups to the authenticated request user.