Executive brief
BentoML is an open-source platform for building and deploying machine learning services. A critical vulnerability in its deserialization logic allows unauthenticated attackers to execute arbitrary code on servers running BentoML by sending maliciously crafted HTTP requests. This enables complete compromise of the server and any models or data it hosts.
Technical details
The vulnerability exists in BentoML's serde.py module, where the deserialize_value() function unsafely calls pickle.loads() on untrusted payload data received from HTTP requests without validation. Pickle deserialization is inherently unsafe as it can execute arbitrary Python code during the deserialization process. The vulnerability is triggered via network requests to any BentoML service endpoint (e.g., POST to /summarize) with a Content-Type header of 'application/vnd.bentoml+pickle' and a crafted pickle payload. No authentication or user interaction is required. An attacker can achieve arbitrary code execution with the privileges of the BentoML process. The vulnerability affects versions 1.3.4 through 1.4.2, and has been patched in version 1.4.3.
Affected products
- BentoML BentoML >=1.3.4, <1.4.3
Timeline
- 2025-04-04: disclosed
- 2025-04-04: patched: Version 1.4.3 available