Slopsquatting: hallucinated huggingface-cli package
Researchers registered huggingface-cli, a PyPI name LLMs often hallucinate, and saw tens of thousands of downloads. This shows how attackers could exploit AI-suggested fake packages.
What happened
Attackers register package names that code-generating LLMs hallucinate. Researchers registered hallucinated PyPI name huggingface-cli and observed tens of thousands of downloads (including reported Alibaba adoption). Broader study: 5.2%/21.7% hallucination rates commercial vs open-source models.
How it happened
Read the flow as text & sources
A catalog reconstruction of the supplied source account. Unknown steps remain explicit; an edge describes the reported relationship between steps.
- 01 · Code model hallucinates a package
An assistant recommends a package name that was not a legitimate dependency.
Hunt: A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
Source for step 1 - 02 · An adversary can register that name
The slopsquatting pattern makes the hallucinated name installable.
Hunt: A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
Source for step 2 - 03 · Developer installs the suggested package
The research registered huggingface-cli and measured downloads.
Hunt: A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
Source for step 3 - 04 · Downloads do not prove compromise
The experiment measures exposure; the registered research package does not establish a malicious payload on every user.
Source for step 4
Why it matters
Reported entry point: Developer installs LLM-suggested nonexistent package that attacker registered. Reported impact: huggingface-cli >30,000 downloads cited; 205,474 unique fake names in study corpus.
Check these source-linked conditions against your setup.
The research demonstrates downloads of a package name suggested incorrectly by code models.
Conditions to check- The workflow requires trusting an AI-suggested package name without checking its provenance.
- The reported downloads demonstrate adoption of the name, not verified victim compromise.
Source-linked applicability guidance. Confirm current scope in the original report.
What you can do
Protection & prevention
Verify the package exists in the official project documentation before installing AI-suggested dependencies.
Pin packages; verify registry names against official docs; SCA on AI-suggested deps
Catalog defensive guidance based on the reported behavior. Confirm scope and current mitigations in the original source.
Detection queries
Draft query starters grouped by the attack stages where they apply.
Start with the logs you collect. Each hunt identifies its required visibility, field mapping and limits. Queries are catalog-authored drafts using reusable behavior profiles; test with known activity and your normal baseline before alerting.
01Code model hallucinates a packageDependency / CI trust boundaryCustom schema · Draft
An assistant recommends a package name that was not a legitimate dependency.
What to look for
A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
Compare the model recommendation with registry provenance and the lockfile; a recommended name alone does not establish installation or compromise.
Visibility: Defender-side logs where collected
Required logs
- Package-manager and CI job logs
- Lockfile / manifest / workflow diffs
- Runner process trees, secret access and egress
Coverage limit. Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.
Sigma
title: Hunt - Dependency / CI trust boundary
id: 5fa9c45a-ac1c-4666-a598-e80626320997
status: experimental
description: A package or workflow change introduces a lifecycle hook, remote
dependency or new command that accesses secrets or external services.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
- Authorized activity matching this broad hunt; baseline and investigate
before alerting.
level: low
logsource:
category: application
product: openattacks_audit
definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
Target and CorrelationId from the required source logs first.
detection:
selection:
EventType:
- package.install
- ci.workflow.change
- package.lifecycle.exec
condition: selection
KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated descSPL
sourcetype="openattacks:audit"
EventType IN ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.
- Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise.
02An adversary can register that nameDependency / CI trust boundaryCustom schema · Draft
The slopsquatting pattern makes the hallucinated name installable.
What to look for
A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
Visibility: Defender-side logs where collected
Required logs
- Package-manager and CI job logs
- Lockfile / manifest / workflow diffs
- Runner process trees, secret access and egress
Coverage limit. Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.
Sigma
title: Hunt - Dependency / CI trust boundary
id: 5fa9c45a-ac1c-4666-a598-e80626320997
status: experimental
description: A package or workflow change introduces a lifecycle hook, remote
dependency or new command that accesses secrets or external services.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
- Authorized activity matching this broad hunt; baseline and investigate
before alerting.
level: low
logsource:
category: application
product: openattacks_audit
definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
Target and CorrelationId from the required source logs first.
detection:
selection:
EventType:
- package.install
- ci.workflow.change
- package.lifecycle.exec
condition: selection
KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated descSPL
sourcetype="openattacks:audit"
EventType IN ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.
- Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise.
03Developer installs the suggested packageDependency / CI trust boundaryCustom schema · Draft
The research registered huggingface-cli and measured downloads.
What to look for
A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
Package downloads demonstrate exposure, not malware execution or confirmed compromise.
Visibility: Defender-side logs where collected
Required logs
- Package-manager and CI job logs
- Lockfile / manifest / workflow diffs
- Runner process trees, secret access and egress
Coverage limit. Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.
Sigma
title: Hunt - Dependency / CI trust boundary
id: 5fa9c45a-ac1c-4666-a598-e80626320997
status: experimental
description: A package or workflow change introduces a lifecycle hook, remote
dependency or new command that accesses secrets or external services.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
- Authorized activity matching this broad hunt; baseline and investigate
before alerting.
level: low
logsource:
category: application
product: openattacks_audit
definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
Target and CorrelationId from the required source logs first.
detection:
selection:
EventType:
- package.install
- ci.workflow.change
- package.lifecycle.exec
condition: selection
KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated descSPL
sourcetype="openattacks:audit"
EventType IN ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.
- Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise.
Technical detailsTooling, impact & MITRE ATLAS
Attack context
- AI's role
- Agent / MCP as target
- Initial access
- Developer installs LLM-suggested nonexistent package that attacker registered
Tooling as reported
AI products, models and artifacts
- Code-generating LLMs
Other tooling
- PyPI/npm typosquat registration
Targets and reported impact
- Reported scale / exposure
- huggingface-cli >30,000 downloads cited; 205,474 unique fake names in study corpus
Detection rules
- Review attack-specific indicatorsGUIDANCE
Monitor for the techniques described in Slopsquatting: hallucinated huggingface-cli package downloads. Refer to sources for specific IOCs and TTPs.
Source defensive notes
Pin packages; verify registry names against official docs; SCA on AI-suggested deps
MITRE ATLAS
AI-specific catalog annotations based on the reported behavior; these are not MITRE case-study assignments.
An installable entity is registered using a package name hallucinated by models. Source
Research identifies package hallucinations that create the exposure. Source
Sources & research credit
3 sourcesResearch by Lasso Security / academic package-hallucination research · Lasso Security / USENIX research lineage
Record & downloads
- Source record name
- Slopsquatting: hallucinated huggingface-cli package downloads
- Entry ID
- slopsquatting-huggingface-cli-2024
- Catalog review
- October 20, 2026
- Category
- attacks-on-ai
- AI involvement confidence
- confirmed