CVE-2024-2912: Bentoml Insecure Deserialization Vulnerability
CRITICALCVE-2024-2912 is a CRITICAL (CVSS 9.8) insecure deserialization vulnerability (CWE-1188: Initialization of a Resource with an Insecure Default) affecting Bentoml libraries in the PyPI ecosystem. The issue involves insecure deserialization in bentoml. Remediation is available by upgrading affected packages to version 1.2.5.
CVE-2024-2912 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2024-2912
To remediate this vulnerability, upgrade all affected Bentoml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install bentoml>=1.2.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show bentoml
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-2912, inspect your installed packages using pip:
pip show bentoml
Analyze the terminal output to locate any version of Bentoml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.5), your application is affected.
Note: The pip show bentoml command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1188: Initialization of a Resource with an Insecure Default, where the product initializes or sets a resource with a default that is intended to be changed by the product's installer, administrator, or maintainer, but the default is not secure. In Bentoml, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-2912 Affected Bentoml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
bentoml
|
PyPI |
< 1.2.5
|
1.2.5
|
References
Frequently Asked Questions
What is CVE-2024-2912?
Which Bentoml versions are affected?
What version fixes CVE-2024-2912?
Is bentoml affected?
What is the CVSS score of CVE-2024-2912?
What CWE is associated with CVE-2024-2912?
How can I check PyPI dependencies for CVE-2024-2912?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hvj5-mvw9-93j3",
"modified" : "2024-04-16T18:24:33Z",
"published" : "2024-04-16T00:30:33Z",
"aliases" : [ "CVE-2024-2912" ],
"summary" : "Insecure deserialization in BentoML",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "bentoml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.5"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-2912"
}, {
"type" : "WEB",
"url" : "https://github.com/bentoml/bentoml/commit/fd70379733c57c6368cc022ac1f841b7b426db7b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/bentoml/BentoML"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/349a1cce-6bb5-4345-82a5-bf7041b65a68"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1188" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-16T18:24:33Z",
"nvd_published_at" : "2024-04-16T00:15:11Z"
}
}