Skip to content
supplychainattack.orgSupply chain attack incident catalog
resolvedhigh

Malicious code in ai-labs-snippets-sdk (PyPI)

The ai-labs-snippets-sdk package on PyPI contained malicious code that exfiltrates system information (IP address, username, .gitconfig) to a remote target. The malicious payload was embedded as pickle-serialized code within a file disguised as an AI model, executed during package import.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
All users who installed affected versions of ai-labs-snippets-sdk from PyPI
Ecosystems
Attack vectors
Threat actor
Affected entities
  • ai-labs-snippets-sdkPyPI package containing malicious code

The ai-labs-snippets-sdk package distributed via PyPI contained malicious code designed to exfiltrate sensitive system information. Upon import, the package loads a file masquerading as an AI model that contains pickle-serialized malicious code.\n\nThe payload collects basic system data including IP address, username, and the contents of the user's .gitconfig file, then transmits this information to a remote attacker-controlled target. This represents a data exfiltration attack with limited but real impact on affected systems.\n\nThe malicious package was identified and attributed to campaign 2025-05-ai-labs-snippets-sdk. Multiple versions of the package were compromised. The incident was documented by the OpenSSF malicious-packages project (MAL-2025-5094).

Indicators of compromise

Packages
  • ai-labs-snippets-sdk

Remediation

  • Immediately uninstall ai-labs-snippets-sdk from all systems
  • Audit systems that imported the package for unauthorized access or data exfiltration
  • Review .gitconfig files and git credentials for potential compromise
  • Check network logs for suspicious outbound connections from the time of package installation
  • Rotate any credentials or tokens that may have been exposed via .gitconfig
  • Use a package manager with security scanning to prevent installation of malicious packages

Sources

  1. GitHub Advisory GHSA-3958-5f85-fq5w · GitHub Advisory Database

Cite this entry

"Malicious code in ai-labs-snippets-sdk (PyPI)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed July 21, 2026; last updated July 21, 2026. https://supplychainattack.org/incident/malicious-code-in-ai-labs-snippets-sdk-pypi-1ofwuf

Suggest a correction

Found an error or have a newer source? Corrections to factual errors take priority over new entries.

  1. resolvedcritical

    Malicious code in afrit-name (PyPI)

    Malicious code was discovered in the afrit-name package on PyPI. The incident was identified and documented by the OpenSSF malicious packages project.

    PyPICompromised package
  2. resolvedcritical

    Malicious code in adv2099m7 (PyPI)

    Malicious code was discovered in the adv2099m7 package on PyPI. The package was identified and cataloged by the OpenSSF malicious packages project.

    PyPICompromised package
  3. resolvedcritical

    Malicious code in adrandom (PyPI)

    The adrandom package on PyPI contained malicious code that executed spyware and information-stealing malware. It was part of a campaign by the EsqueleSquad group that published nearly 6,000 malicious packages across PyPI and NPM.

    EsquelesquadPyPICompromised package
  4. resolvedcritical

    Malicious code in ziphash (PyPI)

    The ziphash package on PyPI contained malicious code that downloads and executes multi-stage malware during archive-support class initialization. The malware exhibits obfuscation and remote code execution capabilities, classified as part of the 2025-11-uzip campaign.

    2025 11 UzipPyPICompromised package