NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2026-7212: notes-mcp has a Path Traversal issue

mediumCVSS 4.0 5.5 · 3.1 7.3GHSA-vc5j-42hh-j3mr

notes-mcp up to 0.1.4 does not keep file paths inside its notes folder. The `read`, `write`, `mkdir`, `rm` and `rmdir` tools in `notes_mcp.py` join the caller's `path` onto `root_dir` with no boundary check, so `../` segments reach any file the server can access. A public exploit exists and no patched version is listed.

Published Apr 28, 2026 · Updated May 6, 2026 · Analysis Oct 29, 2026

What an attacker can do

notes-mcp treats root_dir as the note vault. Each tool computes root_dir / path and then acts on the result: read calls read_text(), write calls write_text(), and mkdir, rm and rmdir act on the joined path. The upstream report says no call site uses resolve(), relative_to() or any other check, and Path joining does not stop ../.

The report's proof of concept calls write with ../../../../tmp/notes_mcp_escape.md, which should create a file outside the vault. A read with ../../../../etc/hosts would return that file. Because rm and rmdir share the flaw, a caller can also delete files and folders outside the vault. The reporter validated this by reading the source rather than by running it, so the runtime effect is not confirmed in the report.

Any MCP client that can call these tools can exploit it, including an AI agent steered by prompt injection. The advisory says the attack is remote and needs no privileges, and that the exploit is public. The reach is whatever the server's account can read, write or delete: shell profiles, SSH keys, project files and scripts. The project has not responded to the issue.

Who is affected

notes-mcp (pip) 0.1.4 and earlier. The file is notes_mcp.py, and all five tools are involved: read, write, mkdir, rm, rmdir.

pip show notes-mcp

Check your MCP client configuration for entries that start the server and which root_dir it uses.

notes-mcp

Ecosystem
PyPI
Affected
<= 0.1.4
Fixed in
No patched version yet
Check
pip show notes-mcp

How to fix it

No patched version exists. The project had not replied to the upstream issue when we read it. The reporter suggests resolving each candidate path and confirming it is relative to the resolved root_dir before every operation, with tests for ../, absolute paths, symlinks and Windows drive prefixes.

Until a fix ships, the report suggests these steps:

  • Restrict the service account that runs the server.
  • Disable the rm and rmdir tools.
  • Use the server only in trusted workflows.

Removing the server from agents that read untrusted content is the safest option.

How to tell if you were hit

Search MCP tool-call logs for read, write, mkdir, rm or rmdir calls whose path contains .. or starts with /. On disk, look for files created or deleted outside root_dir by the user that runs the server, such as the notes_mcp_escape.md marker from the report. Also review any agent session that handled untrusted web or document content before such calls. The advisory names no log signature.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

A security vulnerability has been detected in edvardlindelof notes-mcp up to 0.1.4. This affects an unknown function of the file notes_mcp.py. The manipulation of the argument root_dir/path leads to path traversal. The attack is possible to be carried out remotely. The exploit has been disclosed publicly and may be used. The project was informed of the problem early through an issue report but has not responded yet.

Questions

Is there a fixed notes-mcp version for CVE-2026-7212?

No. Versions up to 0.1.4 are affected and the advisory data lists no patched version. The upstream issue had no maintainer response.

Which tools are affected?

The upstream report names read, write, mkdir, rm and rmdir. All join the caller's path onto root_dir without a boundary check.

Can it delete files?

By the report's description, yes. rm and rmdir act on the same unchecked path. The reporter suggests disabling them as a stopgap.

Has the exploit been confirmed at runtime?

The report says the proof of concept was validated through source-level analysis, not dynamic replay. The advisory states that the exploit is public.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries