Ultralytics AI library hit by a supply chain attack

ISGroup Cybersecurity

Ultralytics, a widely used AI library with over 60 million downloads on PyPI, has fallen victim to a sophisticated supply chain attack. Cybersecurity researchers at ReversingLabs revealed the attack on December 4, explaining that the malicious version (8.3.41) of the library was designed to distribute the XMRig cryptocurrency miner. The attackers exploited a Script Injection vulnerability in GitHub Actions to compromise the build environment.

Date2024-12-11 16:21:13
Information
  • Fix Available
  • Active Exploitation

Technical Summary

The attack was executed via a vulnerability in GitHub Actions scripts, which allowed for arbitrary code execution within the build environment. The attackers, using a GitHub account named openimbot, initiated malicious pull requests with payloads embedded in branch names.

Key steps of the attack:

  • Environment Compromise: The attackers bypassed code review processes to inject XMRig downloader code directly into the build pipeline.

  • Malicious Code Injection: Key files such as downloads.py and model.py were modified to include platform-specific payload delivery mechanisms.

  • Payload Execution: The injected code downloaded and executed the XMRig cryptocurrency miner, leveraging victims’ resources for crypto mining.

The first mitigation attempt failed. Version 8.3.42, released as a “secure” update on December 5, contained the same malicious code as version 8.3.41. The issue was only resolved later that same day with version 8.3.43.

Recommendations

  • Apply updates: Upgrade to version 8.3.43 or later to remove the malicious code.
  • Secure build pipelines: Review and protect CI/CD workflows against script injection vulnerabilities.
  • Monitor dependencies: Regularly audit libraries for unexpected updates or unauthorized changes.

Protect your organisation with Threat Intelligence and Digital Risk Protection.

Choose ISGroup for a practical, tailored engagement:

  • A focused assessment of your environment and requirements
  • Clear findings with a prioritised, actionable roadmap
  • Direct support from experienced specialists through remediation and implementation
Talk to an expert