Hugging Face smolagents Remote Python Executor Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face smolagents. Authentication is not required to exploit this vulnerability. The specific flaw exists within the parsing of pickle data. The issue results from the lack of proper validation of user-supplied data, which can result in deserialization of untrusted data. An attacker can leverage this vulnerability to execute code in the context of the service account. Was ZDI-CAN-28312.
The vulnerability exists in the pickle format data parsing mechanism used by the remote Python code executor. The application does not perform appropriate validation of user-supplied data before deserialization (CWE-502). An attacker can submit a specially crafted pickle payload to the vulnerable endpoint, resulting in execution of embedded code. No authentication is required to carry out the attack.
The attacker gains the ability to execute arbitrary code in the context of the service account under which the application runs. In practice, this can lead to complete system takeover, data breach, and further lateral movement within the network.
Patches available from the vendor should be applied according to the references. Additionally, it is recommended to restrict network access to the service and monitor attempts to transmit unexpected data to endpoints processing pickle data.
Hugging Face smolagents — versions specified in the vendor references
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H