Skip to content
HighVulnerability

GHSA-wfgq-w7cq-qj7j: mistral.rs Media Loader: Unauthenticated SSRF and arbitrary local file read via image_url

Published
Record updated
View JSON
Affected
  • mistralrs-server-core <= 0.8.17
Fixed in
0.8.18

Summary

mistral.rs fetches request-supplied image and audio URLs through parse_image_url and parse_audio_url in mistralrs-server-core/src/util.rs without host, IP or allowlist checks, and opens file:// URLs and existing bare paths on the server. Because the server is unauthenticated by default, a remote client sending image_url or audio_url content can trigger server-side requests to internal or cloud-metadata addresses (SSRF) and read arbitrary local files. The error messages differ between existing and nonexistent paths, which lets an attacker probe which files exist.

Mitigation

Suggested fix: restrict request-supplied media to http(s) and data:, stop resolving bare strings to local files and stop honoring the file scheme from request input (gate local media behind an explicit, default-disabled option). Before fetching http(s), resolve the host, reject non-global IPs, pin the connection to the validated IP and re-validate or disable redirects. Cap the read size.