# CVE-2026-49986: Cortex has Untrusted Project Bootstrap Code Execution via `CLAUDE_PROJECT_DIR`

- Severity: High 7.1 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-01T18:41:35.000Z
- Modified: 2026-09-18T20:09:01.757Z
- Also known as: GHSA-gvpp-v77h-5w8g, PYSEC-2026-2676
- Weaknesses: CWE-829
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

The Cortex MCP server (`neuro-cortex-memory`), a cross-platform persistent memory MCP, prior to version 3.17.1 treats the `CLAUDE_PROJECT_DIR` environment variable — automatically set by Claude Code to the currently open project directory — as a trusted Cortex developer checkout. When the `open_visualization` tool is invoked, `_find_dev_source()` resolves the user's active project directory as a candidate Cortex source root. The only validation performed by `_is_cortex_root()` is a check for the presence of an `mcp_server/` subdirectory and a `ui/unified-viz.html` file. An attacker who places these two marker files in a malicious repository can cause Cortex to execute an arbitrary `mcp_server/server/visualize_bootstrap.py` from that directory via `subprocess.run([sys.executable, ...])`, achieving code execution with the privileges of the victim's local user process. Version 3.17.1 fixes the issue.

(As written by CVE List.)

## Affected

- cdeust Cortex: < 3.17.1
- neuro-cortex-memory (PyPI): before 3.18.0

## Every score

- GitHub_M: CVSS:4.0 7.1 High `CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`

## References

- <https://github.com/cdeust/Cortex/security/advisories/GHSA-gvpp-v77h-5w8g> (exploit, web)
- <https://github.com/cdeust/Cortex/releases/tag/v3.17.1> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/neuro-cortex-memory/PYSEC-2026-2676.yaml>
- <https://github.com/cdeust/Cortex> (package)
- <https://pypi.org/project/neuro-cortex-memory> (package)
- <https://github.com/advisories/GHSA-gvpp-v77h-5w8g> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-49986> (advisory)

## Sources

- CVE List: [CVE-2026-49986](https://www.cve.org/CVERecord?id=CVE-2026-49986), CVE Terms of Use, modified 2026-08-17
- GitHub Advisory Database: [GHSA-gvpp-v77h-5w8g](https://github.com/advisories/GHSA-gvpp-v77h-5w8g), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-49986](https://nvd.nist.gov/vuln/detail/CVE-2026-49986), Public domain, modified 2026-09-18
- PyPA Advisory Database: [PYSEC-2026-2676](https://osv.dev/vulnerability/PYSEC-2026-2676), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-49986 · Whole record: https://cve.day/CVE-2026-49986.json · Rebuilt by cve.day 2026-11-25T22:59:32.926Z
