Описание
vLLM: Server-Side Request Forgery (SSRF) in download_bytes_from_url
Summary
A Server Side Request Forgery (SSRF) vulnerability in download_bytes_from_url allows any actor who can control batch input JSON to make the vLLM batch runner issue arbitrary HTTP/HTTPS requests from the server, without any URL validation or domain restrictions.
This can be used to target internal services (e.g. cloud metadata endpoints or internal HTTP APIs) reachable from the vLLM host.
Details
Vulnerable component
The vulnerable logic is in the batch runner entrypoint vllm/entrypoints/openai/run_batch.py, function download_bytes_from_url:
Key properties:
- The function only parses the URL to dispatch on the scheme (
data,http,https). - For
http/https, it directly callssession.get(url)on the provided string. - There is no validation of:
- hostname or IP address,
- whether the target is internal or external,
- port number,
- path, query, or redirect target.
- This is in contrast to the multimodal media path (
MediaConnector), which implements an explicit domain allowlist.download_bytes_from_urldoes not reuse that protection.
URL controllability
The url argument is fully controlled by batch input JSON via the file_url field of BatchTranscriptionRequest / BatchTranslationRequest.
- Batch request body type:
There is no restriction on the domain, IP, or port of file_url in these models.
- Batch input is parsed directly from the batch file:
The batch runner reads each line of the input file (args.input_file), parses it as JSON, and constructs a BatchTranscriptionRequest / BatchTranslationRequest. Whatever file_url appears in that JSON line becomes batch_request_body.file_url.
file_urlis passed directly intodownload_bytes_from_url:
So the data flow is:
- Attacker supplies JSON line in the batch input file with arbitrary
body.file_url. BatchRequestInput/BatchTranscriptionRequest/BatchTranslationRequestparse that JSON and storefile_urlverbatim.make_transcription_wrappercallsdownload_bytes_from_url(batch_request_body.file_url).download_bytes_from_url’s HTTP/HTTPS branch issuesaiohttp.ClientSession().get(url)to that attacker-controlled URL with no further validation.
This is a classic SSRF pattern: a server-side component makes arbitrary HTTP requests to a URL string taken from untrusted input.
Comparison with safer code
The project already contains a safer URL-handling path for multimodal media in vllm/multimodal/media/connector.py, which demonstrates the intent to mitigate SSRF via domain allowlists and URL normalization:
and:
download_bytes_from_url does not reuse this allowlist or any equivalent validation, even though it also fetches user-provided URLs.
Ссылки
- https://github.com/vllm-project/vllm/security/advisories/GHSA-pf3h-qjgv-vcpr
- https://nvd.nist.gov/vuln/detail/CVE-2026-34753
- https://github.com/vllm-project/vllm/pull/38482
- https://github.com/vllm-project/vllm/commit/57861ae48d3493fa48b4d7d830b7ec9f995783e7
- https://github.com/advisories/GHSA-pf3h-qjgv-vcpr
- https://github.com/pypa/advisory-database/tree/main/vulns/vllm/PYSEC-2026-3410.yaml
- https://pypi.org/project/vllm
Пакеты
vllm
>= 0.16.0, < 0.19.0
0.19.0
Связанные уязвимости
vLLM is an inference and serving engine for large language models (LLMs). From 0.16.0 to before 0.19.0, a server-side request forgery (SSRF) vulnerability in download_bytes_from_url allows any actor who can control batch input JSON to make the vLLM batch runner issue arbitrary HTTP/HTTPS requests from the server, without any URL validation or domain restrictions. This can be used to target internal services (e.g. cloud metadata endpoints or internal HTTP APIs) reachable from the vLLM host. This vulnerability is fixed in 0.19.0.
vLLM is an inference and serving engine for large language models (LLMs). From 0.16.0 to before 0.19.0, a server-side request forgery (SSRF) vulnerability in download_bytes_from_url allows any actor who can control batch input JSON to make the vLLM batch runner issue arbitrary HTTP/HTTPS requests from the server, without any URL validation or domain restrictions. This can be used to target internal services (e.g. cloud metadata endpoints or internal HTTP APIs) reachable from the vLLM host. This vulnerability is fixed in 0.19.0.
vLLM is an inference and serving engine for large language models (LLM ...