DEV Community

andreagomez
andreagomez

Posted on

mcp-video-analyzer: When a Video URL Becomes a Server-Side Request

mcp-video-analyzer: When a Video URL Becomes a Server-Side Request

An MCP tool that accepts media URLs sits between an agent and the network. If that tool trusts a URL because its path appears to end in a video extension, the agent's network position becomes part of the attack surface. CVE-2026-138033 describes that failure in mcp-video-analyzer versions from 0.2.0 before 0.10.1.

The vulnerable assumption

The tool accepted any HTTP or HTTPS URL ending in a video extension and then fetched it. The CVE record says prompt injection could make tools such as get_frames request loopback, private, or cloud metadata addresses, either directly or through redirects. The fetched response could then be written to disk or returned as rendered screenshots.

The problem is not that the code lacked a list of blocked IP addresses in the abstract. It is that a filename suffix was treated as evidence about where a request would go. The host, resolved address, redirect target, and final response all need separate checks.

Why redirects and DNS matter

A URL filter that runs once before a fetch is incomplete. A public hostname can resolve to a private address, and an apparently external URL can redirect to a service that was never in the original request. DNS can also change between validation and connection. The relevant control is applied at the outbound connection layer: resolve the destination, reject non-public address ranges, repeat the check for every redirect, and bind the connection to the validated address where the client supports it.

Cloud metadata is especially sensitive because a successful fetch may return credentials or instance role information without requiring a second exploit. Loopback and private-network services can expose administrative APIs that were never intended to accept requests from an agent.

Exposure is conditional

The CVE gives CVSS 4.0 a base score of 7.0 and CVSS 3.1 a base score of 6.1. The score requires prompt influence and a user interaction path, so not every deployment can be attacked in the same way. A local, unattended use may have a narrower reachability problem than a shared server that processes untrusted transcripts.

Those conditions do not make the control optional. A media service often runs with network access because it needs to download remote content. The same access can reach control planes when the destination policy is weak.

Remediation and verification

Upgrade to 0.10.1 or later. The vendor supplied an advisory, a patch commit, and release notes. After upgrading, verify that the service account can reach only the destinations it needs. Keep cloud metadata blocked from application egress, require authentication on the MCP endpoint, and log the original URL, resolved address, redirect chain, and final destination for each fetch.

Review tool permissions as well. If the agent does not need arbitrary video retrieval, expose a bounded retrieval workflow that accepts approved media sources. Input validation should reinforce that design, not serve as its only boundary.

A useful test is to submit a public URL that redirects to an internal listener while recording which process makes the second request. The test should demonstrate that the destination policy is enforced after resolution and after each redirect. The CVE does not provide a universal proof that every deployment is exposed, so the test needs to match the deployed network path.

References

Top comments (2)

Collapse
 
userxnom profile image
Abdullah Naseer •

The redirects-and-DNS section is the part most SSRF write-ups gloss over, and it is the whole vulnerability here. A filter that checks the URL once before the fetch is a snapshot, but the fetch happens later, against whatever the name resolves to then — and a redirect in between can swap the destination entirely. Blocking a list of private IPs at the door means nothing if the door is checked once and the request walks through a different one.

I also liked that your remediation does not stop at "upgrade to 0.10.1." Logging the original URL, the resolved address, the redirect chain, and the final destination for every fetch is the part that makes an incident answerable afterwards — without that chain, you cannot even tell whether a fetch was the attack or a normal video. One question: your follow-up post mentions twelve indexed mcp-video-analyzer instances — did any of them respond to the redirect-to-internal-listener test, or is it still unknown whether those twelve are actually reachable that way?

Collapse
 
ahmetozel profile image
Ahmet Özel •

CVE-2026-138033 is a textbook reminder that suffix checks like ending in a video extension provide zero SSRF protection once an MCP tool performs outbound fetches on behalf of an untrusted prompt. Between 302 redirects and DNS rebinding, validating the URL string once at entry still leaves cloud metadata endpoints and loopback admin APIs exposed.

Enforcing destination checks at the transport layer—resolving DNS once, rejecting RFC1918, link-local, and metadata CIDR ranges, pinning the socket to the validated IP, and re-running the check on every redirect hop—is the only reliable boundary. Running the media fetcher inside an egress-restricted network namespace adds a strong second layer.