AAK-MCP-APISIX-CVE-2026-124726-001: Apache APISIX image 3.19.0: an openapi-to-mcp tool call can reach API paths the OpenAPI document never declared, with the Route's credentials
- Severity
- MEDIUM
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/container_image_pins.py- Auto-fixable
- No.
- SARIF name
ApisixOpenapiToMcpPathParamTraversal
What it detects
Apache APISIX, an API gateway, ships as the Docker Hub image apache/apisix. Its openapi-to-mcp plugin, new in 3.19.0, serves the operations of an OpenAPI document as MCP tools on a Route and sends each tool call to the Route's base_url with the headers the Route adds, typically the upstream API's credentials. It fills an operation's path template with the caller's path parameters after ngx.escape_uri, which leaves dots alone, and checks nothing else, so a value of .. fills a whole segment that the receiving server resolves away, and an encoded separator that the server decodes splits one: a caller of the MCP endpoint reaches an endpoint the document never declared, under the declared tool's HTTP method, with the Route's credentials (CVE-2026-124726, CVSS 4.0 6.9, CWE-23). Checked in the source and the images: apisix/plugins/openapi-to-mcp is absent at 3.18.0 and ships in 3.19.0, whose build_path in tools/handler.lua substitutes each value with no segment check, and the 3.19.0-debian image carries that same file; 77055643 (#14154, "confine a path parameter to one path segment") refuses a value holding a separator unless the Route sets allow_encoded_path_separators, and any value that leaves an empty or dot segment, in 3.20.0 and its images.
How to fix
Run apache/apisix 3.20.0 or later, pinned by version. Until then remove openapi-to-mcp from Routes whose upstream credentials reach more than the OpenAPI document declares, or scope those credentials to the declared operations.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-APISIX-CVE-2026-124726-001
Limitations
Reads image references only: an image: value or any other mention of apache/apisix: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 3.19.0 below 3.20.0 are reported, which on Docker Hub are 3.19.0-debian, 3.19.0-ubuntu and 3.19.0-redhat; tags below 3.19.0 predate the plugin and are not. latest was the 3.20.0 image on 2026-11-14, so an untagged reference is not reported, nor is dev. A tag taken from a variable, as in the apisix-docker example's ${APISIX_IMAGE_TAG:-...}, states no version AAK reads, and the official Helm chart leaves image.tag empty so that its appVersion decides, which the values file does not state. The rule reads the tag, not whether any Route enables openapi-to-mcp, so a gateway with no MCP Route is reported too. An install from the RPM or DEB packages states no version AAK reads. docker.io/apache/apisix and mirrors under another registry are not matched, and commented-out lines are skipped.
References
- CVE: CVE-2026-124726
- OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering), MCP07:2025 (Insufficient Authentication & Authorization)
- OWASP Agentic Top 10: ASI02 (Tool Misuse and Exploitation), ASI03 (Identity and Privilege Abuse), ASI04 (Agentic Supply Chain Vulnerabilities)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-INJECT-06 (Tool Param Path Traversal)
- CSA AI Controls Matrix (AICM): AIS-07, IAM-01, 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-APISIX-CVE-2026-124726-001.md: the page then shows that text, with the registry reference appended under it.