CVE-2026-49291: mcp-memory-service OAuth Read-only Clients Can Write Vulnerability

HIGH
Advisory Identifier: GHSA-2r68-g678-7qr3
CVSS 8.1
CWE-862
Published
Advisory Summary

CVE-2026-49291 is a HIGH (CVSS 8.1) oauth read-only clients can write vulnerability (CWE-862: Missing Authorization) affecting mcp-memory-service libraries in the PyPI ecosystem. The issue involves oauth read-only clients can write and delete memories through mcp tools/call. Remediation is available by upgrading affected packages to version 10.65.3.

CVE-2026-49291 at a Glance

CVE Identifier CVE-2026-49291
GHSA Identifier GHSA-2r68-g678-7qr3
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-862: Missing Authorization
Affected Product mcp-memory-service
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-49291

To remediate this vulnerability, upgrade all affected mcp-memory-service dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mcp-memory-service fixed: 10.65.3
pip install mcp-memory-service>=10.65.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show mcp-memory-service

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-49291, inspect your installed packages using pip:

pip show mcp-memory-service

Analyze the terminal output to locate any version of mcp-memory-service in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.65.3), your application is affected.

Note: The pip show mcp-memory-service command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In mcp-memory-service, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The HTTP MCP JSON-RPC endpoint at `/mcp` requires only OAuth `read` scope for all requests, then dispatches `tools/call` directly to handlers that include mutating tools. A read-only OAuth client can call `store_memory` and `delete_memory` through MCP even though the corresponding REST endpoints require `write` scope. ## Technical Details `src/mcp_memory_service/web/api/mcp.py` declares `mcp_endpoint` with `user: AuthenticationResult = Depends(require_read_access)`. For `tools/call`, it extracts the requested tool name and arguments, then calls `handle_tool_call(storage, tool_name, arguments)` without passing the authenticated user or checking a per-tool required scope. The MCP tool registry includes both read tools and write tools. In the same handler file, `store_memory` creates a `Memory` object and calls `storage.store(...)`, while `delete_memory` calls `storage.delete(content_hash)`. These operations are reachable with only the `read` scope. The REST endpoint demonstrates the intended boundary: `POST /api/memories` uses `Depends(require_write_access)` and rejects a read-only token with 403 `insufficient_scope`. ## Reproduction 1. Enable OAuth and disable anonymous access. 2. Generate a valid OAuth JWT with only `scope: read`. 3. Confirm the REST write endpoint rejects it: ```http POST /api/memories Authorization: Bearer <read-only-token> Content-Type: application/json {"content":"rest denied control"} ``` Expected and observed: HTTP 403 with `Required scope 'write' not granted`. 4. Send the same read-only token to the MCP endpoint: ```http POST /mcp Authorization: Bearer <read-only-token> Content-Type: application/json { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "store_memory", "arguments": { "content": "mcp read scope stored this", "tags": ["poc"] } } } ``` Observed: HTTP 200 JSON-RPC success and the storage `store` sink is reached. 5. A read-only token can also call `delete_memory` through MCP if it knows a content hash: ```http POST /mcp Authorization: Bearer <read-only-token> Content-Type: application/json { "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "delete_memory", "arguments": {"content_hash": "<known_hash>"} } } ``` Observed: HTTP 200 JSON-RPC success and the storage `delete` sink is reached. ## Impact A client intended to be read-only can inject or delete memories through the MCP API. This can corrupt the memory database, influence future agent context, and destroy stored user memories without the OAuth `write` scope required by the REST API. ## Affected Versions Confirmed present on current main commit `c99a922477df41f75a44db11182ae48a57311910` and latest release tag `v10.65.0` (`4eb4a62665589f9dd9f8c393afa32de434b4098a`). ## Suggested Fix Enforce authorization per MCP tool at `tools/call` time. Require `write` for `store_memory` and `delete_memory`, keep `read` only for read-only tools, and add regression tests proving direct `tools/call` to mutating tools is rejected before the handler reaches storage when the caller has only `read` scope.

CVE-2026-49291 Affected mcp-memory-service Versions

1 component(s)
Fixed Versions:
10.65.3
Product / Package Ecosystem Affected Versions Fixed Version
mcp-memory-service
PyPI
< 10.65.3
10.65.3

References

Frequently Asked Questions

What is CVE-2026-49291?
CVE-2026-49291 is a security vulnerability in mcp-memory-service involving OAuth read-only clients can write and delete memories through MCP tools/call under CWE-862: Missing Authorization.
Which mcp-memory-service versions are affected?
Affected versions include releases prior to 10.65.3 across affected packages: mcp-memory-service.
What version fixes CVE-2026-49291?
Upgrading to 10.65.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mcp-memory-service affected?
Yes, mcp-memory-service is affected in releases prior to 10.65.3. Upgrade your dependency to 10.65.3 or later.
What is the CVSS score of CVE-2026-49291?
CVE-2026-49291 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2026-49291?
CVE-2026-49291 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check PyPI dependencies for CVE-2026-49291?
Run the dependency tree command: 'pip show mcp-memory-service'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2r68-g678-7qr3",
  "modified" : "2026-06-26T21:04:38Z",
  "published" : "2026-06-26T21:04:38Z",
  "aliases" : [ "CVE-2026-49291" ],
  "summary" : "mcp-memory-service: OAuth read-only clients can write and delete memories through MCP tools/call",
  "details" : "## Summary\n\nThe HTTP MCP JSON-RPC endpoint at `/mcp` requires only OAuth `read` scope for all requests, then dispatches `tools/call` directly to handlers that include mutating tools. A read-only OAuth client can call `store_memory` and `delete_memory` through MCP even though the corresponding REST endpoints require `write` scope.\n\n## Technical Details\n\n`src/mcp_memory_service/web/api/mcp.py` declares `mcp_endpoint` with `user: AuthenticationResult = Depends(require_read_access)`. For `tools/call`, it extracts the requested tool name and arguments, then calls `handle_tool_call(storage, tool_name, arguments)` without passing the authenticated user or checking a per-tool required scope.\n\nThe MCP tool registry includes both read tools and write tools. In the same handler file, `store_memory` creates a `Memory` object and calls `storage.store(...)`, while `delete_memory` calls `storage.delete(content_hash)`. These operations are reachable with only the `read` scope.\n\nThe REST endpoint demonstrates the intended boundary: `POST /api/memories` uses `Depends(require_write_access)` and rejects a read-only token with 403 `insufficient_scope`.\n\n## Reproduction\n\n1. Enable OAuth and disable anonymous access.\n2. Generate a valid OAuth JWT with only `scope: read`.\n3. Confirm the REST write endpoint rejects it:\n\n```http\nPOST /api/memories\nAuthorization: Bearer <read-only-token>\nContent-Type: application/json\n\n{\"content\":\"rest denied control\"}\n```\n\nExpected and observed: HTTP 403 with `Required scope 'write' not granted`.\n\n4. Send the same read-only token to the MCP endpoint:\n\n```http\nPOST /mcp\nAuthorization: Bearer <read-only-token>\nContent-Type: application/json\n\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"store_memory\",\n    \"arguments\": {\n      \"content\": \"mcp read scope stored this\",\n      \"tags\": [\"poc\"]\n    }\n  }\n}\n```\n\nObserved: HTTP 200 JSON-RPC success and the storage `store` sink is reached.\n\n5. A read-only token can also call `delete_memory` through MCP if it knows a content hash:\n\n```http\nPOST /mcp\nAuthorization: Bearer <read-only-token>\nContent-Type: application/json\n\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 2,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"delete_memory\",\n    \"arguments\": {\"content_hash\": \"<known_hash>\"}\n  }\n}\n```\n\nObserved: HTTP 200 JSON-RPC success and the storage `delete` sink is reached.\n\n## Impact\n\nA client intended to be read-only can inject or delete memories through the MCP API. This can corrupt the memory database, influence future agent context, and destroy stored user memories without the OAuth `write` scope required by the REST API.\n\n## Affected Versions\n\nConfirmed present on current main commit `c99a922477df41f75a44db11182ae48a57311910` and latest release tag `v10.65.0` (`4eb4a62665589f9dd9f8c393afa32de434b4098a`).\n\n## Suggested Fix\n\nEnforce authorization per MCP tool at `tools/call` time. Require `write` for `store_memory` and `delete_memory`, keep `read` only for read-only tools, and add regression tests proving direct `tools/call` to mutating tools is rejected before the handler reaches storage when the caller has only `read` scope.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mcp-memory-service"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.65.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 10.65.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/doobidoo/mcp-memory-service/security/advisories/GHSA-2r68-g678-7qr3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-49291"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/doobidoo/mcp-memory-service"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/mcp-memory-service/10.65.3"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20260508112116/https://github.com/doobidoo/mcp-memory-service"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-26T21:04:38Z",
    "nvd_published_at" : "2026-06-19T19:16:36Z"
  }
}