The Ultralytics AI library, a popular Python package widely used for artificial intelligence applications, was recently compromised in a sophisticated supply chain attack. Versions 8.3.41 and 8.3.42 were found to contain malicious code designed to deliver a cryptocurrency miner. This breach, which targeted the Python Package Index (PyPI) repository, led to significant CPU usage spikes on affected systems, raising alarms among users. Subsequent investigations revealed that the attack exploited vulnerabilities in the library’s GitHub Actions deployment workflow, enabling attackers to introduce malicious code after the code review stage.
The compromise was traced back to a GitHub account named “openimbot,” which is linked to the OpenIM SDK. The attackers exploited a known script injection vulnerability in the “ultralytics/actions” component of the workflow, as detailed in an advisory by security researcher Adnan Khan in August 2024. This flaw allowed attackers to submit malicious pull requests and execute unauthorized payloads on macOS and Linux systems. Security experts noted the attackers’ sophisticated approach, which bypassed traditional code review safeguards and manipulated the build environment to deploy the miner via PyPI.
Upon discovering the breach, the Ultralytics project maintainer, Glenn Jocher, swiftly removed the compromised versions from PyPI and released a security update to address the issue. The updated workflow now includes enhanced safeguards to prevent similar attacks in the future. Meanwhile, ComfyUI, a project that relies on Ultralytics as a dependency, introduced warnings to notify users of the compromised versions and urged them to update to the latest secure release. Users are strongly advised to verify their installations and remove any affected versions to mitigate potential risks.
While this attack primarily deployed the XMRig cryptocurrency miner, cybersecurity experts warn of the potential for more destructive payloads, such as backdoors or remote access trojans (RATs), in similar scenarios. This incident highlights the growing threat of supply chain attacks in the open-source ecosystem and underscores the critical need for robust security practices. Developers are encouraged to secure their build environments, monitor dependencies for vulnerabilities, and adopt automated tools to detect and mitigate threats in real time.
Reference: