---
id: "CVE-2024-2912"
kind: "vulnerability"
aliases: ["CVE-2024-2912", "GHSA-hvj5-mvw9-93j3"]
title: "Insecure deserialization in BentoML"
severity: "critical"
cvss: 10.0
epss: 0.01509
exploited: false
status: "open"
category: "package"
products: [{"name": "bentoml", "fixed": ["1.2.5"], "affected": "< 1.2.5", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["bentoml", "cwe-1188", "ml-serving", "package", "python", "self-hosted"]
not_affected_if: ["fixed-version"]
published_at: "2024-04-16T00:15:11+00:00"
first_seen_at: "2026-10-27T15:18:30+00:00"
updated_at: "2026-10-27T15:32:59+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-hvj5-mvw9-93j3", "first_seen_at": "2026-10-27T15:18:30+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-2912", "first_seen_at": "2026-10-27T15:32:59+00:00"}]
---

# Insecure deserialization in BentoML

BentoML, a Python framework for serving machine learning models, deserializes attacker-supplied objects in requests sent to any valid endpoint. A crafted serialized object runs operating system commands on the server when it is deserialized.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:bentoml affected < 1.2.5 fixed 1.2.5

## How to check

- Run `pip show bentoml` and check whether the version is below `1.2.5`
- Search the lockfiles and requirements for `bentoml` pinned below `1.2.5`

## Fix

- Upgrade the `bentoml` package to `1.2.5` or later
- Redeploy any BentoML service images or containers after upgrading

## Timeline

- 2026-10-27T15:18:30+00:00 ghsa https://github.com/advisories/GHSA-hvj5-mvw9-93j3
- 2026-10-27T15:32:59+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2024-2912

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
