AGENTFORCE-MCP-23: MCP Server Cache Shared Across Users or Tenants
๐ด High ยท Broken Access Control
Detects module-level caches (dicts, Maps, TTL/LRU caches, @lru_cache) in MCP servers that serve several users with per-request credentials, where the cache key has no user, tenant or token component. One user's cached results are returned to another user who asks for the same resource.
Detailsโ
| Field | Value |
|---|---|
| Rule ID | AGENTFORCE-MCP-23 |
| Severity | High |
| Category | Broken Access Control |
| Compliance | SOC2_CC6, HIPAA |
Remediationโ
Include the caller's identity in every cache key (user id, tenant id or a hash of the access token), or keep the cache per session / per request context. Do not use functools.lru_cache on functions that call APIs with a per-user token taken from context.