Unbounded Python Dependency Caused 421 Errors After fastmcp 3.4.3 Silently Upgraded
A team running a Model Context Protocol server on Google Cloud Run encountered universal 421 Misdirected Request errors immediately after a routine redeployment, despite making no intentional code or infrastructure changes. The root cause was an unbounded dependency constraint — fastmcp>=3.4.2 in pyproject.toml — which allowed the package resolver to silently upgrade to fastmcp 3.4.3 during a routine uv lock refresh. Version 3.4.3 introduced DNS-rebinding protection enabled by default, which rejected any request whose Host header was not explicitly whitelisted, causing every custom-domain request to fail instantly. Because http_allowed_hosts defaulted to None, the effective allowlist was empty, blocking all traffic before any real processing occurred. The incident highlights the risk of open-ended version constraints in production dependencies, as what appears to be a patch release can introduce default-on breaking behavior.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in