In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Incorrect Authorization vulnerabilities in an interactive lesson.
Start learningUpgrade @modelcontextprotocol/server-legacy to version 2.3.1 or higher.
@modelcontextprotocol/server-legacy is a Frozen v1 SSE transport and OAuth Authorization Server helpers for the Model Context Protocol TypeScript SDK. Deprecated; use StreamableHTTP and a dedicated OAuth server in production.
Affected versions of this package are vulnerable to Incorrect Authorization via the verifyBearerToken function in bearer authentication middleware, which fails to validate the resource (audience) claim of incoming tokens against the expected resource identifier. An attacker in possession of a valid token issued for a different resource can present that token to gain unauthorized access, because the middleware accepts any token whose scopes match without confirming that the token's AuthInfo.resource corresponds to the intended server. This constitutes a token audience confusion attack, allowing cross-resource token reuse.