CVE-2026-49986: CWE-829: Inclusion of Functionality from Untrusted Control Sphere in cdeust Cortex
CVE-2026-49986 is a high-severity vulnerability in the Cortex MCP server (neuro-cortex-memory) prior to version 3.17.1. The server trusts the CLAUDE_PROJECT_DIR environment variable, which points to the user's active project directory, as a valid Cortex developer checkout without sufficient validation. This allows an attacker to craft a malicious directory containing specific marker files that cause Cortex to execute arbitrary Python code with the privileges of the local user. The issue is fixed in version 3.17.1.
AI Analysis
Technical Summary
The Cortex MCP server (neuro-cortex-memory) before version 3.17.1 improperly trusts the CLAUDE_PROJECT_DIR environment variable set by Claude Code to the current project directory. When the open_visualization tool is used, the function _find_dev_source() treats this directory as a potential Cortex source root if it contains an mcp_server/ subdirectory and a ui/unified-viz.html file. This minimal validation allows an attacker to place these marker files in a malicious repository, causing Cortex to execute the arbitrary script mcp_server/server/visualize_bootstrap.py via subprocess.run with the victim user's privileges, resulting in code execution. The vulnerability is identified as CWE-829 (Inclusion of Functionality from Untrusted Control Sphere) and has a CVSS 4.0 score of 7.1. The issue is resolved in Cortex version 3.17.1.
Potential Impact
An attacker who can influence the CLAUDE_PROJECT_DIR environment variable or the contents of the referenced directory can execute arbitrary code with the privileges of the local user running Cortex. This can lead to unauthorized code execution on the victim system. There is no indication of required user interaction or network exploitation, and the attack surface is local. No known exploits in the wild have been reported.
Mitigation Recommendations
Upgrade Cortex to version 3.17.1 or later, where this vulnerability is fixed. Until then, avoid running Cortex with untrusted CLAUDE_PROJECT_DIR environment variables or directories containing untrusted files that match the marker criteria. Patch status is not explicitly stated beyond the fix in 3.17.1, so check the vendor advisory for the latest remediation guidance.
CVE-2026-49986: CWE-829: Inclusion of Functionality from Untrusted Control Sphere in cdeust Cortex
Description
CVE-2026-49986 is a high-severity vulnerability in the Cortex MCP server (neuro-cortex-memory) prior to version 3.17.1. The server trusts the CLAUDE_PROJECT_DIR environment variable, which points to the user's active project directory, as a valid Cortex developer checkout without sufficient validation. This allows an attacker to craft a malicious directory containing specific marker files that cause Cortex to execute arbitrary Python code with the privileges of the local user. The issue is fixed in version 3.17.1.
CVSS v4.0
Score 7.1high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Cortex MCP server (neuro-cortex-memory) before version 3.17.1 improperly trusts the CLAUDE_PROJECT_DIR environment variable set by Claude Code to the current project directory. When the open_visualization tool is used, the function _find_dev_source() treats this directory as a potential Cortex source root if it contains an mcp_server/ subdirectory and a ui/unified-viz.html file. This minimal validation allows an attacker to place these marker files in a malicious repository, causing Cortex to execute the arbitrary script mcp_server/server/visualize_bootstrap.py via subprocess.run with the victim user's privileges, resulting in code execution. The vulnerability is identified as CWE-829 (Inclusion of Functionality from Untrusted Control Sphere) and has a CVSS 4.0 score of 7.1. The issue is resolved in Cortex version 3.17.1.
Potential Impact
An attacker who can influence the CLAUDE_PROJECT_DIR environment variable or the contents of the referenced directory can execute arbitrary code with the privileges of the local user running Cortex. This can lead to unauthorized code execution on the victim system. There is no indication of required user interaction or network exploitation, and the attack surface is local. No known exploits in the wild have been reported.
Mitigation Recommendations
Upgrade Cortex to version 3.17.1 or later, where this vulnerability is fixed. Until then, avoid running Cortex with untrusted CLAUDE_PROJECT_DIR environment variables or directories containing untrusted files that match the marker criteria. Patch status is not explicitly stated beyond the fix in 3.17.1, so check the vendor advisory for the latest remediation guidance.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-02T18:30:51.282Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a7f457cbf8831d539681543
Added to database: 08/14/2026, 16:42:36 UTC
Last enriched: 08/14/2026, 16:56:11 UTC
Last updated: 08/14/2026, 17:01:02 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.