KEVWire

Security intelligence, with context.

Response snapshot Oct 27, 2026, 16:31 UTC

Back to the wire
Permalink
VulnerabilityCVE-2025-54381

BentoML SSRF Vulnerability in File Upload Processing

There's an SSRF in the file upload processing system that allows remote attackers to make arbitrary HTTP requests from the server without authentication.

At a glance

Exploited
Not known
Severity
9.9 Critical (CVSS 3.1)
Chance of exploitation
Not estimated
Sources
1 source

What to do

GitHub lists first patched versions: bentoml: 1.4.19. Confirm the affected range and upgrade guidance in the exact advisory.

Read GitHub-reviewed advisory GHSA-mrmq-3q62-6cc8 (opens a new tab)

What happened

### Description

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.

Continue reading

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 - Sink Analysis

**Source:** User-controlled multipart form field values and JSON request bodies containing URLs

**Call Chain - Path 1 (MultipartSerde - No Validation):** 1. HTTP POST request with multipart form data to any BentoML endpoint with file-type input parameters 2. `MultipartSerde.parse_request()` in `src/_bentoml_impl/serde.py:202` processes the request 3. `form = await request.form()` parses multipart data using Starlette 4. For file-type fields: `value = [await self.ensure_file(v) for v in form.

getlist(k)]` at line 209 5. `MultipartSerde.ensure_file()` called at lines 186-200 with user-controlled string URL 6. **Sink:** `resp = await client.get(obj)` at line 193 - Direct HTTP request with zero validation

**Call Chain - Path 2 (JSONSerde - Weak Validation):** 1. HTTP POST request with JSON body containing URL to endpoint with `IORootModel` + `multipart_fields` 2. `JSONSerde.parse_request()` in `src/_bentoml_impl/serde.py:157` processes the request 3. `body = await request.body()` extracts request body 4. Condition check: `if issubclass(cls, IORootModel) and cls.multipart_fields:` at line 164 5.

Weak validation: `if is_http_url(url := body.decode("utf-8", "ignore")):` at line 165 (only checks scheme) 6. **Sink:** `resp = await client.get(url)` at line 168 - HTTP request after insufficient validation

### Proof of Concept

Create a BentoML service: ```python 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: ```bash # 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.

### Impact - Access AWS/GCP/Azure cloud metadata services for credential theft - Enumerate and interact with internal HTTP services and APIs - Bypass firewall restrictions to reach internal network resources - Perform network reconnaissance from the server's perspective - Retrieve sensitive information disclosed in HTTP response data - Potential for internal service exploitation through crafted requests

### Remediation

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.

Affected package ranges reported by GitHub: bentoml: >= 1.4.0, < 1.4.19

Scores and how they were measured

CVSS base severity

9.9

Version 3.1As of

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:L

Measurement source (opens a new tab)

How bad it is if exploited. Not a prediction of exploitation or proof you are exposed.

EPSS probability

Not available

A model's estimate of exploitation in the next 30 days, not certainty or your own risk.

Related technology

Sources

  1. Primary source

    GitHub-reviewed advisory GHSA-mrmq-3q62-6cc8 (opens a new tab)

    The public advisory supplies the description, affected package/version ranges, and any listed CVSS metric. GitHub review is not local review.

    Published Checked

  2. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-mrmq-3q62-6cc8, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

Cite this record

For factual claims, cite the primary sources above; cite KEVWire for its compilation, dates, and classifications.

APA

KEVWire. (2026, October 27). BentoML SSRF Vulnerability in File Upload Processing (CVE-2025-54381). https://kevwire.com/record/CVE-2025-54381

MLA

"BentoML SSRF Vulnerability in File Upload Processing (CVE-2025-54381)." KEVWire, 27 Oct. 2026, kevwire.com/record/CVE-2025-54381.

Chicago

KEVWire. "BentoML SSRF Vulnerability in File Upload Processing (CVE-2025-54381)." Last modified October 27, 2026. https://kevwire.com/record/CVE-2025-54381.

Evidence summary (plain text)

BentoML SSRF Vulnerability in File Upload Processing (Jul 29, 2025).
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.
CVSS 9.9 (version 3.1; evidence as of Oct 27, 2026; https://github.com/advisories/GHSA-mrmq-3q62-6cc8).
Sources:
GitHub-reviewed advisory GHSA-mrmq-3q62-6cc8: https://github.com/advisories/GHSA-mrmq-3q62-6cc8
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc
Record ID: CVE-2025-54381.
Record origin: Ingested record.
AI evidence: Not assessed.
Known exploitation: Not assessed.
Zero-day status: Not assessed. KEV membership alone does not establish zero-day status.
About this data

This record was ingested from a data source. Retrieved: Oct 27, 2026, 16:25 UTC. Ingestion is not an independent editorial investigation.

A CISA KEV listing documents known exploitation, not necessarily a zero-day; absence from the catalog does not prove a vulnerability has never been exploited.

Technology tags indicate possible relevance, not verified exposure. Confirm the affected product, version, and configuration against your own inventory; KEVWire does not scan your systems.

A personal reading checklist on this device, not verified remediation.

Record JSON

Your account

Email alerts

Email alerts are not available yet. To follow your stack today, use its RSS feed, which honors your filters, or connect an AI agent through the API.

Suggest an improvement

Ideas, missing sources, corrections, and bugs are all welcome. No account needed. Suggestions are reviewed by a person before anything changes.

Record details

Record detail