# GHSA-M5M2-MRXF-7J7Q: Tool-name shadowing across aggregated servers

- Database: GitHub
- Severity: CVSS 5.7 (Medium)
- Published: 2026-07-09
- Modified: 2026-08-19

## Tracked as

- [CVE-2026-76097](https://cve.now/CVE-2026-76097.md): MCP Gateway: Tool-name shadowing across aggregated servers

## Affected versions

- github.com/docker/mcp-gateway (Go): from 0.25.0, fixed in 0.43.1

## Description

### Summary

When aggregating multiple backend servers, tool names share a flat namespace with no per-server scoping or collision check, so one server can shadow another's tool name (last-writer-wins).

### Details

Tool names are built from each backend server's `tools/list` response. The name prefix is empty unless a per-server prefix is set or the gateway-level tool-name-prefix feature is enabled (off by default). The aggregation loop (`reload.go`) registers every server's tools into one flat map (`toolRegistrations`) keyed by raw tool name with no collision check, so two servers advertising the same name resolve last-writer-wins. An untrusted aggregated server can shadow a trusted server's tool name; subsequent calls (and their arguments, which may include credentials) are silently dispatched to the shadowing server.

### Impact

Arguments or secrets passed to a shadowed tool are delivered to the shadowing server instead of the intended one, with no error or warning. Aggregating an untrusted server alongside a trusted one is enough to leak credentials.

### Preconditions

- The gateway aggregates an untrusted server alongside a trusted one, with no per-server tool-name prefix configured.

### Workarounds

- Set a per-server tool-name prefix for aggregated servers (or enable the tool-name-prefix feature).
- Only aggregate trusted servers.

### References

- Fix PRs: https://github.com/docker/mcp-gateway/pull/513 · https://github.com/docker/mcp-gateway/pull/517

## References

- https://github.com/docker/mcp-gateway/security/advisories/GHSA-m5m2-mrxf-7j7q

Page: https://cve.now/GHSA-M5M2-MRXF-7J7Q

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
