NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · BentoML

CVE-2024-2912: Insecure deserialization in BentoML

criticalCVSS 3.0 9.8GHSA-hvj5-mvw9-93j3

BentoML before 1.2.5 deserializes pickle data sent to a service endpoint. A single POST with a crafted pickle object runs operating system commands on the server, with no login. Upgrade to bentoml 1.2.5.

Published Apr 16, 2024 · Updated Oct 27, 2026 · Analysis Nov 2, 2026

What an attacker can do

BentoML services accepted a request body marked with the media type application/vnd.bentoml+pickle and unpickled it. Python's pickle format can call arbitrary functions while loading, so an attacker who can reach any valid endpoint can send a serialized object that runs OS commands at load time. The advisory says the endpoint can be any valid one.

The CVSS vector (9.8) shows network access, low complexity, no privileges and no interaction. The server process then runs attacker code. Model servers often hold model weights, cloud credentials and access to feature stores or databases, and often run on GPU hosts with broad network reach. An attacker can steal that data, tamper with model outputs, or use the host as a foothold.

The attacker needs only network access to the service port. Services published to the internet or shared internal networks are the exposed ones.

Who is affected

The pip package bentoml before 1.2.5. Any deployed Bento service that listens on a reachable port is exposed. Check:

pip show bentoml

Check the version inside each deployed image or environment too, not only on the developer machine.

bentoml

Ecosystem
PyPI
Affected
< 1.2.5
Fixed in
1.2.5
Check
pip show bentoml

How to fix it

Upgrade to bentoml 1.2.5.

pip install --upgrade "bentoml>=1.2.5"

The fix commit makes api_endpoint in src/_bentoml_impl/server/app.py read the Content-Type header. For the main service, a request with the media type application/vnd.bentoml+pickle is rejected with an Unsupported Media Type error. Rebuild and redeploy your Bentos, since a built Bento ships its own bentoml version. The sources give no other workaround; restrict network access to the service port until you redeploy.

How to tell if you were hit

Check access logs for requests with a Content-Type of application/vnd.bentoml+pickle, mainly from clients that are not your own. After the fix, those requests get a 415 response. On the host, look for child processes started by the BentoML worker, such as shells, curl or wget, and for outbound connections the service does not normally make. Treat any such activity as full compromise and rotate the credentials the service could read.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

An insecure deserialization vulnerability exists in the BentoML framework, allowing remote code execution (RCE) by sending a specially crafted POST request. By exploiting this vulnerability, attackers can execute arbitrary commands on the server hosting the BentoML application. The vulnerability is triggered when a serialized object, crafted to execute OS commands upon deserialization, is sent to any valid BentoML endpoint. This issue poses a significant security risk, enabling attackers to compromise the server and potentially gain unauthorized access or control.

Questions

Does CVE-2024-2912 need authentication?

No. The CVSS vector lists no privileges and no user interaction. Any valid endpoint on the service accepts the request.

Does upgrading my dev machine fix deployed services?

No. Each deployed Bento carries its own bentoml version, so rebuild and redeploy to get 1.2.5.

Is it exploited in the wild?

No source in this entry says so, and it is not in CISA's KEV catalog. Its EPSS score is about 1.5 percent.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More BentoML vulnerabilities

All BentoML entries