CVE-2024-2912 Insecure Deserialization Leading to RCE in bentoml/bentoml
Attackers can execute arbitrary code on servers running BentoML by sending crafted serialized objects to valid endpoints.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-2912?
CVE-2024-2912 is a critical unsafe deserialization vulnerability in bentoml/bentoml, published on 16 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-1188
Which versions are affected by CVE-2024-2912?
3 open source packages ship an affected version, including bentoml.
| Package | Affected | Fixed in |
|---|---|---|
bentoml PyPI | All versions | 1.2.5 |
bentoml PyPI | All versions | 1.2.5 |
bentoml PyPI | All versions | 1.2.5 |
How do I fix CVE-2024-2912?
Upgrade bentoml to 1.2.5 or later.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2024-2912 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-2912 exists.
Sources
Also known as GHSA-hvj5-mvw9-93j3, PYSEC-2026-296.