{"answers":{"affected":"3 open source packages ship an affected version, including neuro-cortex-memory.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49986 exists.","fix":"Upgrade neuro-cortex-memory to 3.18.0 or later.","what":"CVE-2026-49986 is a high-severity code injection vulnerability in cdeust Cortex, published on 14 Aug 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-49986 and fix it if it is affected.\n\nWhat it is: CVE-2026-49986 is a high-severity code injection vulnerability in cdeust Cortex, published on 14 Aug 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49986 exists.\n\nAffected packages and fixed versions:\n- neuro-cortex-memory (PyPI): affected all versions; fixed in 3.18.0\n- neuro-cortex-memory (PyPI): affected all versions; fixed in 3.18.0\n- neuro-cortex-memory (PyPI): affected all versions; fixed in 3.18.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-49986/ (Markdown: https://insights.sbomify.com/CVE-2026-49986/index.md)","id":"CVE-2026-49986","markdown":"https://insights.sbomify.com/CVE-2026-49986/index.md","name":"CVE-2026-49986","record":{"aliases":["GHSA-gvpp-v77h-5w8g","PYSEC-2026-2676"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Cortex MCP server","requires_auth":"low_privilege","summary":"An attacker can achieve arbitrary code execution by placing specific marker files in a project directory, causing the Cortex MCP server to execute malicious bootstrap code.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":7.1,"severity":"high","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-829","name":"Inclusion of Functionality from Untrusted Control Sphere"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Cortex has Untrusted Project Bootstrap Code Execution via `CLAUDE_PROJECT_DIR`","id":"CVE-2026-49986","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":3,"n_references":3,"next":{"headline":"Repomix: Command Injection (RCE) via `--remote-branch` Argument Injection","id":"CVE-2026-49987"},"packages":[{"ecosystem":"PyPI","fixed":["3.18.0"],"introduced":["0"],"last_affected":[],"package":"neuro-cortex-memory","purl":null,"source":"GHSA-gvpp-v77h-5w8g"},{"ecosystem":"PyPI","fixed":["3.18.0"],"introduced":["0"],"last_affected":[],"package":"neuro-cortex-memory","purl":"pkg:pypi/neuro-cortex-memory","source":"GHSA-gvpp-v77h-5w8g"},{"ecosystem":"PyPI","fixed":["3.18.0"],"introduced":["0"],"last_affected":[],"package":"neuro-cortex-memory","purl":"pkg:pypi/neuro-cortex-memory","source":"PYSEC-2026-2676"}],"prev":{"headline":"Path traversal in kestra","id":"CVE-2026-49984"},"products":["Cortex"],"published":"2026-08-14","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-08-17","vendors":["cdeust"]},"summary":"An attacker can achieve arbitrary code execution by placing specific marker files in a project directory, causing the Cortex MCP server to execute malicious bootstrap code.","url":"https://insights.sbomify.com/CVE-2026-49986/"}