Disclosed weakness · no CVE recorded

MCP Memory temporary-file race could change another file’s permissions

Model Context Protocol · @modelcontextprotocol/server-memory

First documented disclosure · Review checkpoint

Summary

A graph save could change permissions on a file outside the configured memory path.

Severity and exploitation evidence

Medium · numeric CVSS score not recorded. Severity source.

Exploitation not established: Public original reports and static source review establish the weakness or reported demonstrations. Malicious exploitation against users is not established; this review executed no exploit or package.

Exploitation evidence source

Technical severity is not a measure of observed attacks or of risk to your deployment. Attempts, demonstrations, and successful compromise retain the qualifications in the source.

How the weakness works

Path-based chmod followed an attacker-replaced temporary symlink after the file was opened.

Conditions required

A local account can write and search the graph directory, invoke the opt-in local HTTP tool, and win a save race.

Potential impact

The demonstrated canary became more readable; actual credential theft was not demonstrated.

Affected versions and configurations

1.0.0 through 2.2.1; the report directly tested 2.2.1.

Fix and mitigation status

2.2.2 writes and changes permissions through an exclusively created file handle.

Practical next steps

Use 2.2.2 explicitly and keep the graph directory private to its operator. Older date-versioned npm installs need an explicit target version.

Operating lesson

Keep permission changes bound to the file handle opened by the operation.

Evidence and limits

The report gives a CVSS 3.1 base score of 4.2 and a conditional environmental 7.8; the current maintainer metadata is Medium without numeric CVSS. Default stdio/private-directory deployments are outside the demonstrated scenario. The inode check precedes a path-based rename; source review establishes the external-chmod correction, not general race-free saving. The public correction PR, stable monorepo 2.6.0 release and issue-specific tagged production source were reviewed. Package versions are distinct from the monorepo version. No CVE is published in the reviewed maintainer identity fields. Original report prose describing an unpatched test build is superseded only for remediation by current advisory metadata and the release.

Sources