CVE-2025-27520: BentoML: unauthenticated RCE via insecure deserialization
GHSA-33xw-247w-6hmc CRITICAL PoC AVAILABLE CISA: ATTENDAny BentoML deployment running v1.3.4–1.4.2 is fully compromised by a single unauthenticated HTTP request. With EPSS at 0.87, active exploitation is highly probable. Patch to v1.4.3 immediately; if patching is blocked, firewall all BentoML endpoints until the upgrade is complete.
What is the risk?
CRITICAL. CVSS 9.8 with network-accessible, zero-auth RCE and no user interaction required. EPSS of 0.87 places this in the top percentile for likely active exploitation. BentoML serves ML models in production environments, making exposed instances high-value targets for model theft, credential harvesting, and lateral movement into broader ML infrastructure. Default port exposure and the prevalence of BentoML in cloud-hosted inference pipelines amplify the blast radius.
What systems are affected?
How severe is it?
What is the attack surface?
What should I do?
5 steps-
IMMEDIATE
Upgrade all BentoML instances to v1.4.3 (pip install --upgrade bentoml==1.4.3).
-
If immediate patching is not possible, restrict network access to BentoML endpoints via firewall — whitelist only trusted IP ranges.
-
Audit process logs for anomalous child process spawns from the BentoML process and unexpected outbound connections.
-
Audit whether BentoML endpoints are inadvertently internet-exposed (default port 3000).
-
Post-patch, rotate all credentials accessible from the BentoML host: API keys, DB passwords, cloud IAM tokens, model registry credentials.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-27520?
Any BentoML deployment running v1.3.4–1.4.2 is fully compromised by a single unauthenticated HTTP request. With EPSS at 0.87, active exploitation is highly probable. Patch to v1.4.3 immediately; if patching is blocked, firewall all BentoML endpoints until the upgrade is complete.
Is CVE-2025-27520 actively exploited?
A weaponized Metasploit module (exploit/linux/http/bentoml_rce_cve_2025_27520) exists for CVE-2025-27520, meaning the exploit is point-and-click and the risk of opportunistic exploitation is high.
How to fix CVE-2025-27520?
1. IMMEDIATE: Upgrade all BentoML instances to v1.4.3 (pip install --upgrade bentoml==1.4.3). 2. If immediate patching is not possible, restrict network access to BentoML endpoints via firewall — whitelist only trusted IP ranges. 3. Audit process logs for anomalous child process spawns from the BentoML process and unexpected outbound connections. 4. Audit whether BentoML endpoints are inadvertently internet-exposed (default port 3000). 5. Post-patch, rotate all credentials accessible from the BentoML host: API keys, DB passwords, cloud IAM tokens, model registry credentials.
What systems are affected by CVE-2025-27520?
This vulnerability affects the following AI/ML architecture patterns: model serving, inference pipelines, MLOps platforms, AI microservices, containerized ML deployments.
What is the CVSS score for CVE-2025-27520?
CVE-2025-27520 has a CVSS v3.1 base score of 9.8 (CRITICAL). The EPSS exploitation probability is 43.67%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0025 Exfiltration via Cyber Means AML.T0049 Exploit Public-Facing Application AML.T0050 Command and Scripting Interpreter AML.T0072 Reverse Shell Compliance Controls Affected
What are the technical details?
Original Advisory
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. 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. This vulnerability is fixed in 1.4.3.
Exploitation Scenario
An adversary scans for publicly exposed BentoML inference APIs (default port 3000). They craft a single HTTP POST request to any BentoML endpoint that triggers the unsafe deserialization path in serde.py, embedding a Python pickle payload that spawns a reverse shell. No authentication, no special headers, no prior knowledge of the model required. From the beachhead, they enumerate model artifacts, cloud credentials in environment variables, and connected data stores. Model weights and training datasets are exfiltrated before the compromise is detected — and in containerized deployments, they attempt container escape to reach the underlying host.
Weaknesses (CWE)
CWE-502 — Deserialization of Untrusted Data: The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
- [Architecture and Design, Implementation] If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.
- [Implementation] When deserializing data, populate a new object rather than just deserializing. The result is that the data flows through safe input validation and that the functions are safe.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H References
- github.com/advisories/GHSA-33xw-247w-6hmc
- nvd.nist.gov/vuln/detail/CVE-2025-27520
- github.com/bentoml/BentoML/commit/b35f4f4fcc53a8c3fe8ed9c18a013fe0a728e194 Patch
- github.com/bentoml/BentoML/security/advisories/GHSA-33xw-247w-6hmc Exploit 3rd Party
- github.com/ARPSyndicate/cve-scores Exploit
- github.com/PuddinCat/GithubRepoSpider Exploit
- github.com/amalpvatayam67/day09-bentoml-deser-lab Exploit
- github.com/nomi-sec/PoC-in-GitHub Exploit
Timeline
Related Vulnerabilities
CVE-2025-54381 9.9 BentoML: unauthenticated SSRF via file upload URLs
Same package: bentoml CVE-2025-32375 9.8 BentoML: RCE via insecure deserialization in runner
Same package: bentoml CVE-2024-9070 9.8 BentoML: unauthenticated RCE via runner deserialization
Same package: bentoml CVE-2026-35044 8.8 BentoML: malicious bento archive RCE via Jinja2 SSTI
Same package: bentoml CVE-2026-44346 8.8 BentoML: Dockerfile injection enables build-time RCE
Same package: bentoml