Junglewise Threat Intelligence

mistral.rs media loader SSRF and arbitrary file read via image_url

Severity: high · CVSS 7.2 · Published 2026-09-10

Executive brief

mistral.rs is an open-source LLM inference server that includes a vision/audio model capability accepting media URLs in chat requests. An unauthenticated attacker can exploit the media loader to send requests to internal or cloud-metadata services (SSRF), and to probe the server filesystem for file existence, as the server performs no validation of supplied URLs or paths. While the attack does not expose file contents, it enables reconnaissance and potential access to internal service metadata.

Technical details

The vulnerability exists in the `parse_image_url` and `parse_audio_url` functions in mistralrs-server-core/src/util.rs, which process user-supplied media URLs from OpenAI-compatible `/v1/chat/completions` requests without validation. The vulnerable code resolves any supplied URL string, attempts to fetch http(s) URLs via `reqwest::get()` with no IP allowlist or private-IP blocking, and opens file:// URLs or any existing local filesystem path. The http(s) branch has no timeout, reads unbounded response bodies, and follows redirects by default; the file branch allocates full file size in memory before reading. An attacker with network access to a default (unauthenticated) deployment can trigger SSRF to internal services and cloud metadata endpoints, and can use differential error messages to enumerate filesystem entries (existing file returns "image format could not be determined"; nonexistent path returns "file not found on server"). The SSRF is blind (fetched bytes go to a media decoder, not to the attacker), but enables egress to internal hosts. Availability is impacted by unbounded request/file handling. Patch 0.8.18 restricts media to http(s) and data: schemes, validates IP addresses before fetching, disables file:// access, and caps read sizes.

Affected products

  • EricLBuehler mistral.rs <= 0.8.17

Timeline

  • 2026-06-21: disclosed
  • 2026-09-10: advisory
  • 2026-09-10: patched: Version 0.8.18 released

References

Related threats