/

CVE-2026-49291

Severity:

HIGH RISK

(8.1)

Missing Authorization (CWE-862) in MCP Memory Service

CVE-2026-49291

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Data Modification

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

The MCP JSON-RPC endpoint in mcp-memory-service treats all authenticated requests with only OAuth read scope as fully authorized to invoke tools, including mutating ones.

As a result, clients with read-only tokens can store and delete semantic memory entries through MCP, even though equivalent REST APIs correctly require write scope, enabling unauthorized data modification.

Affected context

This vulnerability appears in deployments of mcp-memory-service that expose the HTTP MCP JSON-RPC endpoint at /mcp and rely on OAuth scopes to distinguish read-only from write-capable clients.

It manifests when the service dispatches tools/call requests without re-checking whether the caller holds the write scope for tools that persist or delete data.

Environments where the REST API is correctly locked down by scope but MCP is enabled may unknowingly provide a parallel path for state-changing operations to read-only clients.

Exploit preconditions

  • Attack surface: The HTTP MCP JSON-RPC endpoint at /mcp, reachable over the network where the service is deployed.
  • Required access: A valid OAuth token with at least read scope; no write scope is required.
  • Trigger point: Sending tools/call JSON-RPC requests via MCP to handlers such as store_memory or delete_memory.
  • Why exploitation is possible: The MCP dispatcher treats all authenticated callers as authorized for all tools and ignores the distinction between read and write scopes that is enforced on the REST endpoints.

Why this happens

The underlying issue is a missing authorization check on a specific interface: the MCP JSON-RPC endpoint applies a coarse-grained "is authenticated" check but does not enforce fine-grained, operation-level authorization based on OAuth scopes.

While the REST API methods for storing and deleting memory explicitly require write scope, the MCP layer routes tools/call directly to the same mutating handlers without verifying that the caller has equivalent permissions.

This mismatch between authorization policies across interfaces exemplifies CWE-862: Missing Authorization, where a code path performs sensitive actions without validating whether the requester is permitted to execute them.

Conceptually, the design assumes that MCP requests are read-only or already authorized, but the implementation fails to encode this assumption as explicit checks before executing state-changing operations.

Potential impact

  • Read-only OAuth clients may create new memory entries, altering the semantic state used by AI applications.
  • Read-only OAuth clients may delete or overwrite existing memory, causing data loss or corruption.
  • Application behavior can be influenced by injecting misleading or malicious semantic memory content.
  • Audit trails and access-control expectations can be undermined if write actions are attributed to tokens believed to be read-only.
  • In multi-tenant or shared environments, one tenant's read-only client could potentially affect another tenant's data if isolation controls are weak.

General mitigation guidance

Effective mitigation centers on ensuring consistent, least-privilege authorization across all access paths to mutating operations.

Recommended defensive patterns include:

  • Enforcing operation-level authorization in the MCP dispatcher so that each tools/call is checked against the caller's scopes or roles before invoking handlers.
  • Aligning authorization policies between REST and MCP by centralizing scope checks in a common service that both interfaces must call.
  • Designing tools and handlers with explicit metadata describing required permissions (e.g., "read", "write", "admin") and validating these at runtime.
  • Applying the principle of least privilege to OAuth clients, issuing write scope only to clients that genuinely need it and segregating credentials by use case.
  • Implementing defense-in-depth with server-side configuration that treats all new tools as requiring explicit permission mapping before they can be exposed via MCP.

How teams detect issues like this

Organizations can detect this class of issue by examining both configuration and code for authorization consistency:

  • Use static analysis or code search to locate endpoints that perform state-changing operations and verify they all invoke a common authorization layer.
  • Review MCP dispatcher logic and tool registration code for the presence (or absence) of scope and role checks before invoking handlers.
  • Implement policy-as-code (e.g., via Open Policy Agent or similar engines) to define required scopes per operation and enforce that all interfaces consult these policies.
  • Monitor logs for anomalies, such as tokens marked as read performing operations that correspond to writes, and configure alerts when read-scoped clients trigger mutating behavior.
  • Integrate automated security tests that attempt to perform write operations using read-only credentials over each exposed protocol (REST, MCP, gRPC, etc.) in CI pipelines.

Sources

SourceLink
github.comgithub.com/doobidoo/mcp-memory-service/security/advisories/GHSA-2r68-g678-7qr3
pypi.orgpypi.org/project/mcp-memory-service/10.65.3
web.archive.orgweb.archive.org/web/20260508112116/https://github.com/doobidoo/mcp-memory-service/

Frequently asked

questions

Yes. If the MCP JSON-RPC /mcp endpoint is exposed over the network and accepts OAuth tokens from remote clients, an attacker with a read-scoped token can exploit the issue remotely.

The attacker must possess a valid OAuth token with at least read scope. No write scope is required, making compromised read-only credentials sufficient for unauthorized data modification.

The safest approach is to enforce consistent, operation-level authorization for all mutating actions, regardless of transport.

This typically means centralizing authorization logic and ensuring the MCP dispatcher checks required scopes or roles before invoking tools like store_memory and delete_memory.

Treat every interface—REST, RPC, event-driven, or plugin-based—as a first-class entry point that must enforce the same authorization rules.

Use a single, shared authorization layer, define explicit permissions for each operation, and include automated tests that verify read-only credentials cannot perform state-changing operations across any protocol.

Find out what's already
exploitable in your codebase.