Security context

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

modelcontextprotocol/typescript-sdk
main @ e81758c
27
Fixes
0
CVEs
CRITICAL
Peak severity
Highlights
Auth Bypass: 13 prior fixes. Scrutinize any change in this area.
src/client/auth.ts: most-fixed (4 issues). Treat as high-risk during review.
11 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: Placeholder token exchange logic and missing or bypassed PKCE (Proof Key for Code Exchange) validation allowed authentication bypasses because verification was delegated incorrectly to upstream providers without passing the necessary verifiers.
Auth Bypass: Tokens without explicit expiration properties (undefined, null, or NaN) bypass expiration checks and remain valid indefinitely unless the middleware explicitly validates both the presence and valid bounds of the 'expiresAt' field.
Auth Bypass: Improper path prefix matching on URL checks allowed subpaths without trailing slashes (such as matching /api123 to /api) to bypass authorization boundaries unless paths are properly canonicalized first.