CVE-2025-6242: Vllm: server side request forgery (ssrf) in mediaconnector

Published Jun 18, 2025
·
Updated

Summary

A Server-Side Request Forgery (SSRF) vulnerability exists in the MediaConnector class within the vLLM project's multimodal feature set. The loadfromurl and loadfromurlasync methods fetch and process media from user-provided URLs without adequate restrictions on the target hosts. This allows an attacker to coerce the vLLM server into making arbitrary requests to internal network resources.

This vulnerability is particularly critical in containerized environments like llm-d, where a compromised vLLM pod could be used to scan the internal network, interact with other pods, and potentially cause denial of service or access sensitive data. For example, an attacker could make the vLLM pod send malicious requests to an internal llm-d management endpoint, leading to system instability by falsely reporting metrics like the KV cache state.

Vulnerability Details

The core of the vulnerability lies in the MediaConnector.loadfromurl method and its asynchronous counterpart. These methods accept a URL string to fetch media content (images, audio, video).

https://github.com/vllm-project/vllm/blob/119f683949dfed10df769fe63b2676d7f1eb644e/vllm/multimodal/utils.py#L97-L113

The function directly processes URLs with http, https, and file schemes. An attacker can supply a URL pointing to an internal IP address or a localhost endpoint. The vLLM server will then initiate a connection to this internal resource.

HTTP/HTTPS Scheme: An attacker can craft a request like {"imageurl": "http://127.0.0.1:8080/internalapi"}. The vLLM server will send a GET request to this internal endpoint. File Scheme: The loadfileurl method attempts to restrict file access to a subdirectory defined by --allowed-local-media-path. While this is a good security measure for local file access, it does not prevent network-based SSRF attacks.

Impact in llm-d Environments

The risk is significantly amplified in orchestrated environments such as llm-d, where multiple pods communicate over an internal network.

1. Denial of Service (DoS): An attacker could target internal management endpoints of other services within the llm-d cluster. For instance, if a monitoring or metrics service is exposed internally, an attacker could send malformed requests to it. A specific example is an attacker causing the vLLM pod to call an internal API that reports a false KV cache utilization, potentially triggering incorrect scaling decisions or even a system shutdown.

2. Internal Network Reconnaissance: Attackers can use the vulnerability to scan the internal network for open ports and services by providing URLs like http://10.0.0.X:PORT and observing the server's response time or error messages.

3. Interaction with Internal Services: Any unsecured internal service becomes a potential target. This could include databases, internal APIs, or other model pods that might not have robust authentication, as they are not expected to be directly exposed.

Delegating this security responsibility to an upper-level orchestrator like llm-d is problematic. The orchestrator cannot easily distinguish between legitimate requests initiated by the vLLM engine for its own purposes and malicious requests originating from user input, thus complicating traffic filtering rules and increasing management overhead.

Proposed Mitigation

To address this vulnerability, it is essential to restrict the URLs that the MediaConnector can access. The principle of least privilege should be applied.

It is recommend to implement a configurable allowlist or denylist for domains and IP addresses.

Allowlist: The most secure approach is to allow connections only to a predefined list of trusted domains. This could be configured via a command-line argument, such as --allowed-media-domains. By default, this list could be empty, forcing administrators to explicitly enable external media fetching.

Denylist: Alternatively, a denylist could block access to private IP address ranges (127.0.0.1, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and other sensitive domains.

A check should be added at the beginning of the loadfromurl methods to validate the parsed hostname against this list before any connection is made.

Example Implementation Idea:

python In MediaConnector.init self.alloweddomains = set(config.get("allowedmediadomains", [])) self.deniedipranges = [ipnetwork(r) for r in PRIVATEIPRANGES]

In MediaConnector.loadfromurl urlspec = urlparse(url) hostname = urlspec.hostname

if self.alloweddomains and hostname not in self.alloweddomains: raise ValueError(f"Domain {hostname} is not in the allowed list.")

ipaddress = ipaddress(socket.gethostbyname(hostname)) if any(ipaddress in network for network in self.deniedipranges): raise ValueError(f"Access to private IP address {ipaddress} is forbidden.")

By integrating this control directly into vLLM, empower administrators to enforce security policies at the source, creating a more secure deployment by default and reducing the burden on higher-level infrastructure management.

Other sources

A Server-Side Request Forgery (SSRF) vulnerability exists in the MediaConnector class within the vLLM project's multimodal feature set. The loadfromurl and loadfromurlasync methods fetch and process media from user-provided URLs without adequate restrictions on the target hosts. This allows an attacker to coerce the vLLM server into making arbitrary requests to internal network resources.

MITRE

Affected Software

2 affected componentsFixes available
vllm vllm
pip/vllm>=0.5.0<0.11.0
0.11.0

Event History

Jun 18, 2025
Data Sourced
via Red Hat·03:28 PM
DescriptionSeverityAffected Software
Oct 7, 2025
CVE Published
via MITRE·07:45 PM
Data Sourced
via MITRE·07:45 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·10:14 PM
Data Sourced
via GitHub·10:14 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-6242?

CVE-2025-6242 is classified as a medium severity vulnerability due to its potential for exploitation through SSRF attacks.

2

How do I fix CVE-2025-6242?

To fix CVE-2025-6242, implement input validation and restrictions on the target hosts allowed in the load_from_url and load_from_url_async methods.

3

What impact does CVE-2025-6242 have on my system?

CVE-2025-6242 can allow attackers to make unauthorized requests to internal services, potentially leading to data exposure.

4

Which versions of vLLM are affected by CVE-2025-6242?

All versions of vLLM that include the MediaConnector class are potentially affected by CVE-2025-6242.

5

Is CVE-2025-6242 easy to exploit?

CVE-2025-6242 can be relatively easy to exploit if adequate measures are not taken to restrict user input.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203