Skip to content

AAK-DNS-REBIND-002: Vulnerable MCP SDK version pinned (DNS-rebinding fix missing)

Severity
HIGH
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/dns_rebind.py
Auto-fixable
No.
SARIF name
McpSdkDnsRebindPin

What it detects

A project dependency manifest (requirements.txt, pyproject.toml, package.json, pom.xml, build.gradle) pins an MCP SDK at a version below the DNS-rebinding fix, or declares a range that admits one. Patched versions: Python mcp >= 1.23.0, TS @modelcontextprotocol/sdk >= 1.21.1, Java io.modelcontextprotocol.sdk:mcp-core >= 0.11.0, @apollo/mcp-server >= 1.7.0. Even if the project never serves over StreamableHTTP itself, transitive servers built on the SDK inherit the bug.

How to fix

Bump the SDK to the patched version listed in the rule title. If a bump is not yet possible, ensure every transport surface has its own Host-header allow-list (see AAK-DNS-REBIND-001 remediation).

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-DNS-REBIND-002

Limitations

Reads mcp in the root requirements*.txt and pyproject.toml, and @modelcontextprotocol/sdk and @apollo/mcp-server in the root package.json, taking the lowest version a range allows, so a lower bound below the fix (mcp>=1.2.0) is reported. A git reference, a tarball (at a URL or behind file:) and a workspace: spec are judged by the release their tag, file name or range names (github:o/r#v1.20.0, sdk-1.20.0.tgz, workspace:^1.20.0), with releases compared on their first three numbers, so a pre-release of the fix (#v1.21.1-rc.1) reads as the fix. A declaration that states no version ("latest", workspace:*, a file: directory, a git reference to a commit or a branch, which is any name holding a / but refs/tags/<tag>) is not reported. io.modelcontextprotocol.sdk:mcp-core below 0.11.0 is read as written in the root pom.xml and Gradle files. Declarations of one install that no release satisfies together (mcp==1.23.0 beside mcp==1.22.0 in one requirements file) admit nothing and are not reported; pip refuses to install them too. A lockfile (uv.lock, package-lock.json), a pyproject.toml that does not parse, and a manifest in a sub-directory or over 2 MB are not read. A source file over 512 KB is not read. A pyproject.toml with a key of more than 64 dotted parts, or holding an integer Python cannot convert (one past 4,300 digits), is refused and reported as AAK-INTERNAL-SCANNER-FAIL, and so is a pom.xml that declares a DOCTYPE, which no Maven POM needs: it is not parsed, so no entity it declares is expanded.

References


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-DNS-REBIND-002.md: the page then shows that text, with the registry reference appended under it.