Snowflake-Labs/sfguide-mcp-cortex-agents
Guide to building MCP Server for Cortex Agent
b49ef7816e2dcortex-agents-mcp0.1.0 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
Top risks in plain words
- CRITICAL8 production dependencies have known vulnerabilities (worst: critical).
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Update its vulnerable packages
Use
anyio4.14.2 or later,certifi2026.10.18 or later,idna3.15 or later,mcp1.28.1 or later and 4 more. - Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 1 tool. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
None of the tools reaches any of these in the code the scanner could trace.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
No tool was seen returning text from outside the server to the model.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (1: 1 tool)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
run_cortex_agentstool Run the Cortex agent with the given query, streaming SSE.
Run the Cortex agent with the given query, streaming SSE.
Text the model reads (1)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
run_cortex_agents tool
Run the Cortex agent with the given query, streaming SSE.
What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 1 tool handler traced
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 1 tool handler traced
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 1 tool handler traced
- Requests any addressNo tool sends a request to an address the caller supplies — 1 tool handler traced
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 1 tool handler traced
- Tools that start processesNot seen in the traced code of 1 capability; 1 more call code the scanner could not follow, where it may happen
- Tools that touch filesNot seen in the traced code of 1 capability; 1 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 1 capability; 1 more call code the scanner could not follow, where it may happen
Where the code is: 1 handler in 1 file at commit b49ef7816e2d
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: pyproject.toml
- Lockfiles checked against OSV1 file resolved and checked against the OSV database; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
- Known vulnerabilities in production dependencies CRITICAL8 production packages with known advisories
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionNo MCP SDK declared in a manifest
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 1 capability; 1 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (8 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
anyioPyPI 4.9.0 CRITICAL 4 advisories 4.14.2
- CRITICALGHSA-82r6-8w77-94w6 CVE-2026-63374 PYSEC-2026-4025AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing
- MEDIUMPYSEC-2026-4024 CVE-2026-64847 GHSA-5p39-cfhj-2xmpAnyIO process-pool workers can block indefinitely on undrained stderr
- MEDIUMGHSA-5p39-cfhj-2xmp CVE-2026-64847 PYSEC-2026-4024AnyIO process-pool workers can block indefinitely on undrained stderr
- MEDIUMPYSEC-2026-4025 CVE-2026-63374 GHSA-82r6-8w77-94w6AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing
certifiPyPI 2025.4.26 CRITICAL 2 advisories 2026.10.18
- CRITICALGHSA-6q48-6c7w-9gw2 PYSEC-2026-4320certifi bundles emSign root CAs with compromised intermediate CA keys
- MEDIUMPYSEC-2026-4320 GHSA-6q48-6c7w-9gw2certifi bundles emSign root CAs with compromised intermediate CA keys
python-multipartPyPI 0.0.20 HIGH 14 advisories 0.0.220.0.260.0.27+2 more
- HIGHGHSA-pp6c-gr5w-3c5g CVE-2026-42561 PYSEC-2026-3039python-multipart has Denial of Service via unbounded multipart part headers
- HIGHGHSA-wp53-j4wj-2cfg CVE-2026-24486 PYSEC-2026-1852Python-Multipart has Arbitrary File Write via Non-Default Configuration
- HIGHGHSA-5rvq-cxj2-64vf CVE-2026-53539 PYSEC-2026-3036python-multipart: Quadratic-time querystring parsing with semicolon separators causes CPU denial of service
- MEDIUMPYSEC-2026-3040 CVE-2026-53540 GHSA-v9pg-7xvm-68hfpython-multipart: Negative Content-Length in parse_form buffers the entire body in memory
- MEDIUMPYSEC-2026-3039 CVE-2026-42561 GHSA-pp6c-gr5w-3c5gpython-multipart has Denial of Service via unbounded multipart part headers
- MEDIUMPYSEC-2026-3036 CVE-2026-53539 GHSA-5rvq-cxj2-64vfpython-multipart: Quadratic-time querystring parsing with semicolon separators causes CPU denial of service
- MEDIUMPYSEC-2026-3037 CVE-2026-53538 GHSA-6jv3-5f52-599mpython-multipart: Semicolon treated as querystring field separator enables parameter smuggling
- MEDIUMPYSEC-2026-3041 CVE-2026-53537 GHSA-vffw-93wf-4j4qpython-multipart: Content-Disposition parameter smuggling via RFC 2231/5987 extended parameters
- MEDIUMGHSA-mj87-hwqh-73pj CVE-2026-40347 PYSEC-2026-3038python-multipart affected by Denial of Service via large multipart preamble or epilogue data
- MEDIUMPYSEC-2026-1852 CVE-2026-24486 GHSA-wp53-j4wj-2cfgPython-Multipart has Arbitrary File Write via Non-Default Configuration
- MEDIUMPYSEC-2026-3038 CVE-2026-40347 GHSA-mj87-hwqh-73pjpython-multipart affected by Denial of Service via large multipart preamble or epilogue data
- LOWGHSA-v9pg-7xvm-68hf CVE-2026-53540 PYSEC-2026-3040python-multipart: Negative Content-Length in parse_form buffers the entire body in memory
- LOWGHSA-vffw-93wf-4j4q CVE-2026-53537 PYSEC-2026-3041python-multipart: Content-Disposition parameter smuggling via RFC 2231/5987 extended parameters
- LOWGHSA-6jv3-5f52-599m CVE-2026-53538 PYSEC-2026-3037python-multipart: Semicolon treated as querystring field separator enables parameter smuggling
starlettePyPI 0.46.2 HIGH 14 advisories 0.47.20.49.11.0.1+3 more
- HIGHGHSA-82w8-qh3p-5jfq CVE-2026-54283 PYSEC-2026-249Starlette: request.form() limits silently ignored for application/x-www-form-urlencoded enable DoS
- HIGHGHSA-wqp7-x3pw-xc5r CVE-2026-48818 PYSEC-2026-2281Starlette: SSRF and NTLM credential theft via UNC paths in StaticFiles on Windows
- HIGHGHSA-7f5h-v6xp-fcq8 CVE-2025-62727 PYSEC-2026-1942Starlette vulnerable to O(n^2) DoS via Range header merging in ``starlette.responses.FileResponse``
- MEDIUMPYSEC-2026-161 CVE-2026-48710 GHSA-86qp-5c8j-p5mr X41-2026-002BadHost: Missing Host header validation poisons request.url.path, bypassing path-based security checks
- MEDIUMPYSEC-2026-1941 CVE-2025-54121 GHSA-2c2j-9gv5-cj73Starlette has possible denial-of-service vector when parsing large files in multipart forms
- MEDIUMPYSEC-2026-249 CVE-2026-54283 GHSA-82w8-qh3p-5jfqStarlette is a lightweight ASGI framework/toolkit. From 0.4.1 until 1.3.1, request.form() accepts max_fields and max_part_size to bound resource consumption while parsing form data. These limits are enforced for multipart/form-data, but silently ignored for application/x-www-form-urlencoded. An unauthenticated attacker can therefore send a urlencoded body with an arbitrarily large number of fields or an arbitrarily large field, even when the application configured limits it believed would apply. This vulnerability is fixed in 1.3.1.
- MEDIUMPYSEC-2026-2281 CVE-2026-48818 GHSA-wqp7-x3pw-xc5rStarlette is a lightweight ASGI framework/toolkit. In versions 1.0.1 and earlier, StaticFiles on Windows is vulnerable to SSRF. An UNC path such as \\\\attacker.com\\share can cause os.path.realpath to initiate an outbound SMB connection before the path is rejected, exposing the service account’s NTLMv2 credentials for offline cracking or relay even though the HTTP response is only a 404. The issue affects default follow_symlink=False deployments, including frameworks built on Starlette such as FastAPI; POSIX systems and follow_symlink=True are unaffected. The issue is fixed in 1.1.0.
- MEDIUMPYSEC-2026-1942 CVE-2025-62727 GHSA-7f5h-v6xp-fcq8Starlette vulnerable to O(n^2) DoS via Range header merging in ``starlette.responses.FileResponse``
- MEDIUMGHSA-86qp-5c8j-p5mr CVE-2026-48710 PYSEC-2026-161 X41-2026-002Starlette has missing Host header validation that poisons request.url.path, bypassing path-based security checks
- MEDIUMGHSA-2c2j-9gv5-cj73 CVE-2025-54121 PYSEC-2026-1941Starlette has possible denial-of-service vector when parsing large files in multipart forms
- MEDIUMGHSA-x746-7m8f-x49c CVE-2026-48817 PYSEC-2026-2280Starlette: Arbitrary HTTP method dispatched to `HTTPEndpoint` attributes via `getattr`
- MEDIUMPYSEC-2026-248 CVE-2026-54282 GHSA-jp82-jpqv-5vv3Starlette is a lightweight ASGI framework/toolkit. Prior to 1.3.0, the HTTP request path is not validated before being used to reconstruct request.url. Because request.url is rebuilt by concatenating {scheme}://{host}{path} and re-parsing the result, a path that does not begin with / (for example @google.com) moves the authority boundary during re-parsing, so request.url.hostname and request.url.netloc become attacker-controlled. Code that reads request.url.hostname (rather than the Host header or scope) can therefore be misled into trusting an attacker-supplied host. This vulnerability is fixed in 1.3.0.
- MEDIUMPYSEC-2026-2280 CVE-2026-48817 GHSA-x746-7m8f-x49cStarlette is a lightweight ASGI framework/toolkit. In versions 1.0.1 and below, when dispatching a request, HTTPEndpoint selects the handler by lowercasing the HTTP method and looking it up as an attribute with getattr, without restricting the lookup to a known set of HTTP verbs. When an HTTPEndpoint subclass is registered through Route(...) without an explicit methods= argument, the route does not constrain the method and every method reaches the endpoint. If a non-standard HTTP method whose lowercased name matches an attribute on the endpoint subclass reaches the endpoint, that attribute is invoked as if it were a request handler. An attacker can use this to reach methods that were never meant to be HTTP handlers, such as internal helpers, without the authorization checks applied by the intended public handler. An application (including Starlette-based frameworks like FastAPI) is affected if it registers an HTTPEndpoint subclass via Route(...) without explicitly setting methods=, and that subclass includes extra methods named like non-standard HTTP verbs that take one request argument and return a response. This issue has been fixed in version 1.1.0.
- LOWGHSA-jp82-jpqv-5vv3 CVE-2026-54282 PYSEC-2026-248Starlette: Unvalidated request path concatenated into authority poisons request.url.hostname
mcpPyPI 1.7.1 HIGH 10 advisories 1.9.41.10.01.23.0+2 more
- HIGHGHSA-jpw9-pfvf-9f58 CVE-2026-52869 PYSEC-2026-3482MCP Python SDK: HTTP transports serve session requests without verifying the authenticated principal
- HIGHGHSA-3qhf-m339-9g5v CVE-2025-53366 PYSEC-2026-1616MCP Python SDK vulnerability in the FastMCP Server causes validation error, leading to DoS
- HIGHGHSA-j975-95f5-7wqh CVE-2025-53365 PYSEC-2026-1618MCP Python SDK has Unhandled Exception in Streamable HTTP Transport, Leading to Denial of Service
- HIGHGHSA-9h52-p55h-vw2f CVE-2025-66416 PYSEC-2026-1617Model Context Protocol (MCP) Python SDK does not enable DNS rebinding protection by default
- HIGHGHSA-vj7q-gjh5-988w CVE-2026-59950 PYSEC-2026-3483MCP Python SDK: WebSocket server transport does not support Host/Origin validation
- MEDIUMPYSEC-2026-1617 CVE-2025-66416 GHSA-9h52-p55h-vw2fModel Context Protocol (MCP) Python SDK does not enable DNS rebinding protection by default
- MEDIUMPYSEC-2026-1618 CVE-2025-53365 GHSA-j975-95f5-7wqhMCP Python SDK has Unhandled Exception in Streamable HTTP Transport, Leading to Denial of Service
- MEDIUMPYSEC-2026-3483 CVE-2026-59950 GHSA-vj7q-gjh5-988wMCP Python SDK: WebSocket server transport does not support Host/Origin validation
- MEDIUMPYSEC-2026-3482 CVE-2026-52869 GHSA-jpw9-pfvf-9f58MCP Python SDK: HTTP transports serve session requests without verifying the authenticated principal
- MEDIUMPYSEC-2026-1616 CVE-2025-53366 GHSA-3qhf-m339-9g5vMCP Python SDK vulnerability in the FastMCP Server causes validation error, leading to DoS
idnaPyPI 3.10 MEDIUM 2 advisories 3.15
- MEDIUMPYSEC-2026-215 CVE-2026-45409 GHSA-65pc-fj4g-8rjxInternationalized Domain Names in Applications (IDNA) for Python provides support for Internationalized Domain Names in Applications (IDNA) and Unicode IDNA Compatibility Processing. In versions prior to 3.15, payloads such as `"\\u0660" * N` or `"\\u30fb" * N + "\\u6f22"` utilize the `valid_contexto` function prior to length rejection, and for high values of `N` will take a long time to process. This is the same issue as CVE-2024-3651, however the original remediation in 2024 was not a complete fix. A specially crafted argument to the `idna.encode()` function could consume significant resources. This may lead to a denial-of-service. Starting in version 3.14, the function rejects long inputs as soon as practicable prior to any further processing to minimize resource consumption. In version 3.15, this approach was extended to lesser used alternate functions (i.e. per-label conversions and codec support). A workaround is available. Domain names cannot exceed 253 characters in length. If this length limit is enforced prior to passing the domain to the `idna.encode()` function, it should no longer consume significant resources. This is triggered by arbitrarily large inputs that would not occur in normal usage, but may be passed to the library assuming there is no preliminary input validation by the higher-level application.
- MEDIUMGHSA-65pc-fj4g-8rjx CVE-2026-45409 PYSEC-2026-215Internationalized Domain Names in Applications (IDNA): Specially crafted inputs to idna.encode() can bypass CVE-2024-3651 fix
pygmentsPyPI 2.19.1 MEDIUM 2 advisories 2.20.0
- MEDIUMPYSEC-2026-2987 CVE-2026-4539 GHSA-5239-wwwm-4pmqPygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching
- LOWGHSA-5239-wwwm-4pmq CVE-2026-4539 PYSEC-2026-2987Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching
python-dotenvPyPI 1.1.0 MEDIUM 2 advisories 1.2.2
- MEDIUMGHSA-mf9w-mj56-hr94 CVE-2026-28684 PYSEC-2026-2270python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback
- MEDIUMPYSEC-2026-2270 CVE-2026-28684 GHSA-mf9w-mj56-hr94python-dotenv reads key-value pairs from a .env file and can set them as environment variables. Prior to version 1.2.2, `set_key()` and `unset_key()` in python-dotenv follow symbolic links when rewriting `.env` files, allowing a local attacker to overwrite arbitrary files via a crafted symlink when a cross-device rename fallback is triggered. Users should upgrade to v.1.2.2 or, as a workaround, apply the patch manually.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | stdio |
| Sign-in | not checked needs the live server |
| Servers in the code | 1 (cortex_agent) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2025-09-30 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 1 catalog (github_search) |
|---|---|
| License | Apache-2.0 |
| Created | 2025-05-08 |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.