Highlights
Auth Bypass: 19 prior fixes. Scrutinize any change in this area.
api_server/middleware/rate_limit.py: most-fixed (12 issues). Treat as high-risk during review.
18 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: Development/test mode JWT verification bypasses were incorrectly active in production and staging environments due to weak environment identification checks. This allowed arbitrary user impersonation by submitting mock JSON payloads instead of validated cryptographic tokens.
Privilege Escalation: The API key generation endpoint lacked subset-matching logic on scopes. This enabled callers with limited scopes to escalate their privileges by generating unrestricted legacy API keys or adding scopes exceeding their own.
Denial of Service: The rate-limiter middleware allocated memory buckets for unvalidated API keys before validating them against the database, exposing the service to key-exhaustion and memory-inflation attacks.