Security context

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

latchset/jwcrypto
main @ eb7c266
12
Fixes
4
CVEs
HIGH
Peak severity
25.0%
Coverage
Highlights
Auth Bypass: 6 prior fixes. Scrutinize any change in this area.
jwcrypto/jwt.py: most-fixed (5 issues). Treat as high-risk during review.
3 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: Attackers can bypass cryptographic token protections by substituting expected encrypted tokens (JWE) with signed-only tokens (JWS) or submitting malformed serialization types. This allows execution-context impersonation when explicit token type verification is missing.
Cryptographic Issues: The use of deprecated, weak, or timing-vulnerable algorithms (such as RSA-PKCS#1 v1.5) by default can expose encrypted payloads to plaintext recovery attacks (e.g., Bleichenbacher timing attacks).
Auth Bypass: Weaknesses in parsing multi-valued claims (like lists of audiences or space-separated scope claims) can allow authorization bypasses if elements within the collection are not properly normalized and individually validated.