Incomplete fix for GHSA-r86v-rw5r-2cpj: extproc sidecar still receives the MCP session seed as a container argument
Description
Severity: Medium CVSS 3.1: 4.3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N (same vector as GHSA-r86v-rw5r-2cpj, since this is the unfixed part of the same finding) CWE: CWE-214 (Invocation of Process Using Visible Sensitive Information) Package: Go module github.com/envoyproxy/ai-gateway (controller, extproc, Helm chart ai-gateway-helm) Affected: <= 1.2.0, and main at f4571d6bd8f53696c4e9105f365b556db7b249a8 (2026-10-09) Patched: none yet
Summary
GHSA-r86v-rw5r-2cpj was published on 2026-10-07 with 1.2.0 as the patched version. The 1.2.0 change (#2755, commit 9945796) only touched the Helm chart: it stores the controller's seed in a Secret and hands it to the controller through a secretKeyRef env var. It did not change how the controller passes the seed on to the extproc container that the mutating webhook injects into every Envoy gateway pod. That container still gets -mcpSessionEncryptionSeed <seed> (and -mcpFallbackSessionEncryptionSeed <seed> when a fallback is set) as literal strings in container.Args. So in 1.2.0 and on current main, the seed is still stored in each gateway Pod object and is readable by anyone who can read pods in the gateway namespace. The controller's fallback seed is also still a literal argument in the Helm chart.
Details
All links are pinned to main at f4571d6. The same code is in v1.2.0 (daa9f89): extproc_builder.go, deployment.yaml and cmd/controller/main.go are byte-identical between the two refs, and the v1.2.0...f4571d6 diff of gateway_mutator.go and cmd/extproc/mainlib/main.go does not touch the seed or the args.
- The seed and fallback seed are appended to the extproc args as literal values when an MCPRoute targets the Gateway: github.com/
theagentrouter/ agent-router/ blob/ f4571d6bd8f53696c4e9105f365b556db7b249a8/ internal/ controller/ extproc_builder.go#L301-L312 - Those args become the injected container's
Args: github.com/theagentrouter/ agent-router/ blob/ f4571d6bd8f53696c4e9105f365b556db7b249a8/ internal/ controller/ extproc_builder.go#L166 - The mutating webhook adds that container to the gateway Pod spec (as a native sidecar init container or a regular container): github.com/
theagentrouter/ agent-router/ blob/ f4571d6bd8f53696c4e9105f365b556db7b249a8/ internal/ controller/ gateway_mutator.go#L335-L349 - extproc can only take the seed from these flags. There is no env var or file option, and the flag still defaults to
default-insecure-seed: github.com/theagentrouter/ agent-router/ blob/ f4571d6bd8f53696c4e9105f365b556db7b249a8/ cmd/ extproc/ mainlib/ main.go#L155-L162 - Controller side, after #2755: the primary seed now comes from a Secret through
$(MCP_SESSION_ENCRYPTION_SEED), which keeps it out of the Deployment spec. Kubernetes still expands it into the controller's process command line, though. The fallback seed is still templated in as a literal argument whenevercontroller.mcp.sessionEncryption.fallback.seedis set: github.com/theagentrouter/ agent-router/ blob/ f4571d6bd8f53696c4e9105f365b556db7b249a8/ manifests/ charts/ ai-gateway-helm/ templates/ deployment.yaml#L119-L124 - A leaked fallback seed is as useful to an attacker as the primary one, because extproc accepts IDs that decrypt under the fallback key for as long as it is configured: github.com/
theagentrouter/ agent-router/ blob/ f4571d6bd8f53696c4e9105f365b556db7b249a8/ internal/ mcpproxy/ crypto.go#L107-L117
When the fallback path is used: only when an operator sets controller.mcp.sessionEncryption.fallback.seed (the controller flag --mcpFallbackSessionEncryptionSeed), which values.yaml recommends during seed rotation and when upgrading from the old default seed. If the fallback is default-insecure-seed, nothing new leaks. If it is a real previous seed, that seed lands in the controller Deployment spec and in every gateway Pod's extproc args.
Where the seed can be read today (1.2.0 and main):
- The gateway Pod objects:
kubectl get pod <envoy-pod> -o yaml,kubectl describe pod, and anyget/list/watchon pods in the gateway namespace. That includes the built-inviewClusterRole, which grants pod read but not Secret read. It also includes cluster-wide pod watchers such as monitoring, logging, and policy agents. - etcd: Pod objects are not covered by Secret encryption at rest.
- Kubernetes audit logs that record Pod create or update request bodies.
- The extproc process command line on the node (
/proc/<pid>/cmdline,ps). The controller's primary seed shows up there too, after$(VAR)expansion. - The pprof
/debug/pprof/cmdlineendpoint, which is on by default unlessDISABLE_PPROFis set. It binds to 127.0.0.1:6060, so it is reachable from other containers in the same pod or viakubectl port-forward.
Impact
Anyone who can read gateway pods can recover the MCP session-encryption seed (and the fallback seed, if set). Pod read access is a lower RBAC tier than Secret read access, so this is the same problem the advisory describes. The 1.2.0 fix only moved it off the controller Deployment.
What an attacker can do with the seed on 1.2.0, given that GHSA-953h-535j-jg2v added a subject check:
- Decrypt any observed
Mcp-Session-Idand read the route name, the embedded subject, and the backend MCP session IDs inside it. - Mint new valid session IDs. Since GHSA-953h-535j-jg2v,
sessionFromIDrejects an ID whose embedded subject does not match the caller's authenticated subject (internal/mcpproxy/mcpproxy.go#L310-L322). That stops plain replay of someone else's ID. It does not stop a seed holder: they can decrypt a captured victim ID, re-encrypt the same backend session IDs under their own subject, and resume the victim's backend MCP sessions as themselves. On routes with no authentication the subject is empty for everyone, so the check does nothing there. - Limits, stated honestly: the attacker still needs (a) pod read access in the gateway namespace, (b) a real secret seed in use (1.2.0 generates a random one by default, so this applies to 1.2.0 installs and to older installs that set their own), (c) a valid identity on the route if it is authenticated, and (d) a captured victim session ID to take over that victim's backend session. The seed alone does not let them guess backend session IDs that the upstream MCP servers generate. The impact is therefore mainly confidentiality of session contents and integrity of MCP session binding, not a gateway authentication bypass. That fits the existing Medium rating.
As a side note, the extproc drift hash (extProcConfigDigest, stored as a pod-template annotation) is a SHA-256 over inputs that include the seed. A random 1.2.0 seed makes this harmless. With a weak operator-chosen seed, though, it gives an offline guessing oracle to anyone who can read the Deployment. It would be worth leaving the seed out of that digest, or hashing only a keyed fingerprint of it.
Suggested fix
- Stop putting the seed in the extproc args. Two options:
- Write the resolved seed (and fallback) into the per-gateway filter-config Secret that the controller already generates and that is already mounted into the extproc container as a projected volume (
gateway_mutator.goaround L295-L317 and L337-L342), and have extproc load it from there. This is what was agreed in #2145 and what open PR #2175 (@walsm232) implements. #2175 is 282 commits behindmainand conflicts with the move of the arg-building code intoextproc_builder.go, so it needs a rebase. - Or add
-mcpSessionEncryptionSeedFile/-mcpFallbackSessionEncryptionSeedFileto extproc and mount a Secret holding the seed. This needs the Secret to exist in each gateway namespace, which is why the filter-config Secret route looks simpler.
- Drop the literal fallback-seed argument in the Helm chart: source
--mcpFallbackSessionEncryptionSeedfrom a Secret key the same way #2755 does for the primary seed, or better, add file-path flags so neither seed is expanded into the controller's command line. - Once the seed is no longer passed as an arg, make extproc fail closed (or at least warn loudly) when MCP is enabled and no seed was delivered, so it does not fall back silently to
default-insecure-seedduring a rolling upgrade. #2175's discussion already raises this. - Leave the raw seed out of
extProcConfigDigest. - Please keep #2145 and #2175 open. The 2026-09-28 comments there suggest closing them because #2755 merged, but #2755 only covered the controller Deployment.
Advisory correction request
Since GHSA-r86v-rw5r-2cpj is already published and cannot take comments, we are raising this here. Could you please:
- Update the affected and patched versions. It currently says vulnerable
<= 1.1.0, patched1.2.0, but the extproc part is still present in 1.2.0. Something like vulnerable<= 1.2.0with patched left empty until the fix ships would be accurate. Filling in the package ecosystem (Go,github.com/envoyproxy/ai-gateway) and CWE-214 would also help scanners match it. - Add a finder credit for @aaronjmars if that fits. Right now only @aeonframework is credited, as remediation developer.
Feel free to handle this report as an update to the existing advisory rather than a new one, whichever is easier for you. We are happy to review a fix PR or test a build.
Credits
Finder: Aaron Elijah Mars of Aeon (@aaronjmars, @aeonframework). Tool: Aeon (aeon.fun).