Ultralytics PyPI Releases Compromised Through GitHub Actions Workflow Attack

· Original article ↗

Summary

A crafted pull-request branch name reportedly exploited an Ultralytics GitHub Actions workflow, leading to PyPI releases 8.3.41 and 8.3.42 containing XMRig cryptomining code. The versions were removed; users are advised to uninstall and restore affected systems.

Key points

  • Ultralytics versions 8.3.41 and 8.3.42 on PyPI contained malicious code that downloaded and ran XMRig; the article says local or earlier versions were unaffected.
  • The attacker reportedly exploited unsanitized github.head_ref input in a GitHub Actions workflow triggered by pull requests, using a crafted branch name to execute code.
  • The article speculates that the unavailable file.sh script may have been used to modify package files that added the miner download and execution code.
  • A subsequent Ultralytics release was also compromised, according to the report.
  • The malicious versions were removed from PyPI; the article says later versions are safe to use.
  • Users who installed the affected versions are advised to uninstall them, restore systems to a known-clean state, and monitor for signs of cryptomining.
  • Wiz reports finding Ultralytics in 10% of cloud environments; ComfyUI Impact Pack was among the packages identified as potentially affected through dependency exposure.

Article Details

Attack Vectors
  • An attacker manipulated GitHub Actions by supplying a crafted pull-request branch name that was used as unsanitized input in the “Publish Docs” workflow, enabling arbitrary code execution.
  • The workflow execution was used to modify package files and publish compromised PyPI versions of Ultralytics 8.3.41 and 8.3.42 containing code to download and run XMRig for cryptocurrency mining.
Defensive Notes
  • Uninstall Ultralytics versions 8.3.41 and 8.3.42 and restore affected systems to a previously known clean state.
  • Monitor affected systems for evidence of cryptocurrency mining.
  • The article reports that later Ultralytics versions are safe to use and that the compromised versions were removed from PyPI.

MITRE ATT&CK

Malware

Products

Related Articles