{
  "id": "security/rust/rust-mcp-stack__rust-mcp-sdk/2026-11-29-auth-middleware-scope-check-fails-open",
  "title": "AuthMiddleware scope check fails open when a verified token has no scope claim",
  "category": "security",
  "type": "auth-bypass",
  "severity": "medium",
  "cvss": null,
  "ecosystem": "rust",
  "project": {
    "owner": "rust-mcp-stack",
    "repo": "rust-mcp-sdk",
    "url": "https://github.com/rust-mcp-stack/rust-mcp-sdk"
  },
  "affected_versions": [
    "rust-mcp-sdk 2.0.1"
  ],
  "fixed_version": "2.1.0",
  "status": "fixed",
  "disclosure": {
    "channel": "public-issue",
    "ghsa_id": null,
    "cve_id": null,
    "url": "https://github.com/rust-mcp-stack/rust-mcp-sdk/issues/301",
    "reported_at": "2026-11-29T15:58:19+03:00",
    "published_at": "2026-11-29T15:58:19+03:00"
  },
  "summary": "AuthMiddleware enforced required_scopes only when a verified token carried a scope claim. A token with no scope claim skipped that check and the request continued. This applies to an HTTP server that sets required_scopes, and only to a caller who already holds a valid token from the same authorization server. Reported in public issue #301 by ucsurf; fixed by Ali Hashemi in PR #304 (be55243), released in rust-mcp-sdk 2.1.0. Ali Hashemi (hashemix) closed the issue as completed on 2026-11-29 via release pull request 303.",
  "discovered_at": "2026-11-29T15:58:19+03:00",
  "public": true,
  "credit": "ucsurf",
  "updated_at": "2026-11-30T10:00:00+03:00",
  "pr": {
    "url": "https://github.com/rust-mcp-stack/rust-mcp-sdk/pull/304",
    "state": "merged",
    "merged_at": null,
    "number": 304,
    "issue": 301
  },
  "references": [
    "https://github.com/rust-mcp-stack/rust-mcp-sdk/commit/be55243b6385442c32105373de334119ad074c69",
    "https://github.com/rust-mcp-stack/rust-mcp-sdk/pull/303",
    "https://github.com/rust-mcp-stack/rust-mcp-sdk/releases/tag/rust-mcp-sdk-v2.1.0"
  ]
}
