A malicious version of LiteLLM (opens in new tab), an open-source library used to route requests to AI models, was available on the Python Package Index for about two hours on Wednesday, the project said. Version 1.107.0 was live on PyPI from 11:39 to 13:23 UTC and on Docker Hub from 11:46 to 14:20 UTC, according to LiteLLM (opens in new tab)’s incident report, details also reported by BleepingComputer (opens in new tab) and The Hacker News (opens in new tab).

The release stole credentials and loaded remote-code-execution tools, using files named cook.pth, cook.py and sitecustomize.py that run whenever Python starts, BleepingComputer (opens in new tab) and The Hacker News (opens in new tab) reported, citing the project and security researchers. Cloud security firm Wiz (opens in new tab) said the package was downloaded about 49,000 times, citing ClickPy data, and that the payload showed “strong indications of LLM-aided development.”

LiteLLM (opens in new tab) said it believes attackers obtained GitHub CLI OAuth tokens belonging to three engineers from the logs of an internal deployment that was exposed to the internet, The Hacker News (opens in new tab) reported. The project said version 1.106.2 is safe and its private enterprise release was not affected.

BleepingComputer (opens in new tab) reported that LiteLLM (opens in new tab) has about 92 million monthly downloads and that the project was previously breached in March by a group called TeamPCP.