CVE-2025-27520: Critical BentoML Flaw Allows Full Remote Code Execution, Exploit Available

This security issue gives an attacker the ability to achieve remote code execution on servers running vulnerable BentoML versions by sending a specially crafted HTTP request that exploits an insecure deserialization flaw. The following protection guardrails can further prevent the following steps an attacker can take: Initially, when the attacker attempts to exploit the pickle.loads() function with a malicious payload by manipulating an HTTP request to omit buffer-lengths in the metadata, Python Deserialization Protection intercepts this deserialization process, applying policies to restrict harmful function calls from the deserialized object, thereby aiming to block the arbitrary code execution before it fully materializes on the server. Should the attacker's code, now running on the server, attempt to execute operating system commands for reconnaissance, such as trying to run find or grep to locate AI model files or API keys, Python OS Command Injection Prevention would detect and block these OS command execution attempts originating from the Python process. If the compromised application is running within a container and the attacker, after gaining initial execution, tries to download and run additional tools like network scanners or malware not present in the original container image, Container Drift Protection (Binaries & Scripts) would prevent the execution of these new, unauthorized binaries by maintaining a manifest of original executables. Furthermore, if the attacker's code attempts to execute any script or binary, including legitimate system tools used for malicious purposes like establishing a pivot point with socat, from a non-standard or unauthorized directory such as a temporary download folder, Process Path Exec Allow would block such execution by enforcing that processes only run from pre-approved filesystem paths. Finally, to prevent data theft or unauthorized modification, such as the attacker trying to read sensitive AI model files, configuration files containing credentials, or attempting to corrupt model files on disk to sabotage AI operations, Sensitive File Access monitors and can block these unauthorized access attempts to files designated as critical.
- T1203: Exploitation for Client Execution: The attacker can send malicious payloads via HTTP requests to exploit the deserialization flaw. This involves 'Exploitation for Client Execution' where the attacker sends data to a vulnerable server to trigger execution of arbitrary code. The article mentions that 'the payload content is sourced from an HTTP request, which can be fully manipulated by the attack.' This aligns with the technique of exploiting client-side vulnerabilities through crafted requests.