Highlights
Auth Bypass: 6 prior fixes. Scrutinize any change in this area.
pony/auth.py: most-fixed (12 issues). Treat as high-risk during review.
8 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.
Insecure Deserialization: The use of python's cPickle for parsing session tickets directly allowed untrusted payloads to achieve Arbitrary Code Execution. Several iterations of fixes were needed to transition to safe JSON formats and handle empty or malformed inputs correctly.
Auth Bypass: Flawed logic in user lookup and session state cleanup could lead to unauthorized access. Specifically, setting attributes to None popped values incorrectly, and thread-local state was not consistently cleared on user changes, leading to session leaks.
Cryptographic Weakness: Weaknesses in ticket verification included insecure transition logic when storing active HMAC secrets in the database and a lack of cryptographically secure integrity checks, which originally relied on plain SHA1 hashes rather than secure HMAC constructs.