/

CVE-2026-85686

Severity:

HIGH RISK

(7.5)

Server-Side Request Forgery (CWE-918) in ms-swift API

CVE-2026-85686

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Unauthorized access to internal services and cloud metadata

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

ms-swift's OpenAI-compatible deployment API may fetch attacker-supplied image, audio, or video URLs without validating destinations or filtering redirects. An unauthenticated attacker could abuse this behavior to make the server send requests to internal services or cloud metadata endpoints.

Affected context

The vulnerability occurs in deployments using the ms-swift swift deploy OpenAI-compatible API when multimodal URL parameters are accepted and fetched server-side. Risk increases when the service can reach internal network resources, cloud metadata endpoints, or privileged management interfaces, and when outbound destinations are not constrained.

Exploit preconditions

  • Attack surface: The OpenAI-compatible API's multimodal media URL parameters
  • Required access: No authentication, where the affected endpoint is exposed without access controls
  • Trigger point: Server-side retrieval of attacker-supplied image_url, audio_url, or video_url values
  • Why exploitation is possible: URL destinations are not sufficiently validated and redirects are not adequately restricted, allowing requests to reach unintended internal resources

Why this happens

The underlying bug is server-side request forgery, mapped to CWE-918. The API treats client-provided media URLs as destinations that the server may fetch without applying a trusted-destination policy, network-aware address validation, or redirect filtering. This allows attacker-controlled input to influence the server's outbound request path and potentially cross network trust boundaries.

Potential impact

  • Internal services could receive unauthorized requests from the trusted application host
  • Cloud instance metadata or temporary credentials could be exposed
  • Internal API responses could be disclosed through application behavior or logs
  • Network segmentation controls could be weakened
  • Downstream services could be probed or abused using the server's network position

General mitigation guidance

Mitigation generally focuses on reducing trust in client-supplied URLs and enforcing a narrow outbound request policy.

Common defensive patterns include:

  • Allowing only approved schemes, hosts, ports, and media sources
  • Resolving hostnames and rejecting loopback, link-local, private, reserved, and other protected address ranges
  • Revalidating destinations after DNS resolution and across redirects
  • Disabling redirects or permitting redirects only to explicitly approved destinations
  • Routing media retrieval through an isolated service with restricted network egress
  • Applying least-privilege network policies and avoiding access to cloud metadata endpoints
  • Using authentication and authorization controls for deployment APIs
  • Limiting response size, request duration, and outbound connection resources

How teams detect issues like this

Detection approaches commonly include:

  • Static analysis for HTTP clients that consume request-derived URLs without destination validation
  • Code review checks for unrestricted URL fetching, redirect following, and DNS-resolution gaps
  • Dynamic testing with controlled internal-address and redirect cases in isolated environments
  • Egress monitoring for requests from the service to private networks, loopback ranges, link-local addresses, and metadata endpoints
  • Network policy enforcement that logs or blocks unexpected outbound destinations
  • Automated security review tools that identify SSRF-prone request flows

Sources

SourceLink
github.comgithub.com/modelscope/ms-swift
github.comgithub.com/modelscope/ms-swift/blob/v4.5.2/swift/template/vision_utils.py
github.comgithub.com/modelscope/ms-swift/issues/9740
vulncheck.comvulncheck.com/advisories/ms-swift-4.5.2-unauthenticated-ssrf-via-multimodal-media-urls

Frequently asked

questions

Yes. Where the affected API is exposed without authentication, an attacker may submit crafted multimodal URL parameters over the network.

The attacker generally needs network access to the vulnerable API endpoint. No separate account may be required if the deployment leaves that endpoint unauthenticated.

Treat all client-provided URLs as untrusted, restrict fetching to an explicit allowlist, validate resolved addresses, and prevent unsafe redirects and access to protected network ranges.

Combine application-level URL validation with isolated outbound networking, least-privilege egress controls, metadata endpoint protection, authentication, and monitoring for anomalous server-side requests.

Find out what's already
exploitable in your codebase.