AAK-MCP-EZBOOKKEEPING-CVE-2026-86041-001: ezBookkeeping image 0.10.0 to 1.5.1: a spoofed X-Forwarded-For passes the MCP source-IP allowlist
- Severity
- MEDIUM
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/container_image_pins.py- Auto-fixable
- No.
- SARIF name
EzbookkeepingMcpIpAllowlistXffBypass
What it detects
ezBookkeeping (mayswind/ezbookkeeping), a self-hosted personal finance app with an MCP endpoint, ships as the Docker Hub image mayswind/ezbookkeeping. From 0.10.0 an operator can limit the MCP endpoint to mcp_allowed_remote_ips, but the router is built with gin.New() and never calls SetTrustedProxies, so Gin trusts every proxy and c.ClientIP() returns a caller-supplied X-Forwarded-For value: a caller from any address passes the allowlist, and in later releases api_token_allowed_remote_ips as well, by naming an allowed address, which is then recorded as the transaction's CreatedIp and in the request log. A valid MCP or API token is still required for protected actions (CVE-2026-86041, CVSS 4.0 5.3, CWE-348, GHSA-wchh-mrv2-5h4q). Checked in the source at the commit each image's label names: 0.9.0 has no MCP IP limit; 0.10.0 (06ef2220) adds pkg/middlewares/mcp_server_ip_limit.go, which matches the allowlist against c.ClientIP(), and 1.5.1 still sets no trusted proxies; 1.6.0 (d79a5beb) accepts forwarding headers only from configured trusted proxies.
How to fix
Run mayswind/ezbookkeeping 1.6.0 or later, pinned by version, and set its trusted proxies to the reverse proxy actually in front of it: by default 1.6.0 trusts every private and loopback range. Until then put the MCP endpoint behind a proxy that overwrites X-Forwarded-For, and rely on the MCP token, not the IP allowlist, as the gate.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-EZBOOKKEEPING-CVE-2026-86041-001
Limitations
Reads image references only: an image: value or any other mention of mayswind/ezbookkeeping:TAG in YAML (compose files, Kubernetes manifests, MCP configs), a Helm values mapping of repository and tag, Dockerfile and Containerfile FROM, and docker run arguments in *mcp*.json and claude_desktop_config.json. Tags from 0.10.0 below 1.6.0 are reported, the two-part 0.10 and 1.0 to 1.5 among them; tags below 0.10.0 predate the MCP IP limit and are not. latest was the 2.1.1 digest on 2026-11-11, so an untagged reference, the README's own docker run, is not reported. The SNAPSHOT-<date> and latest-snapshot tags state no version and are not reported, although the snapshots built before the fix (2026-06-16) carry the flaw. The rule reads the tag, not whether an IP allowlist is configured, so a deployment with none, which this flaw does not reach, is reported too. A binary or a server built from source states no version AAK reads, and this rule reads no go.mod. docker.io/mayswind/ezbookkeeping and mirrors under another registry are not matched, and commented-out lines are skipped.
References
- CVE: CVE-2026-86041
- OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering), MCP07:2025 (Insufficient Authentication & Authorization), MCP08:2025 (Lack of Audit and Telemetry)
- OWASP Agentic Top 10: ASI03 (Identity and Privilege Abuse), ASI04 (Agentic Supply Chain Vulnerabilities)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-INJECT-03 (Header Injection)
- CSA AI Controls Matrix (AICM): IAM-01, IVS-04, STA-08
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-EZBOOKKEEPING-CVE-2026-86041-001.md: the page then shows that text, with the registry reference appended under it.