Habr•September 28, 2026•🇷🇺Translated from Russian

AI Model Hallucinations Fuel Slopsquatting Attacks on PyPI and npm Registries

AI models frequently hallucinate package names that do not exist in public registries, creating opportunities for supply-chain attacks known as slopsquatting. A researcher examined 139 names that five recent AI models consistently invented and checked their status on PyPI and npm as of 22 September. Seven names were already registered, with one previously hosting malicious code.

The attack works when developers copy installation commands such as pip install or npm install directly from AI responses without verification. If the name is available, an attacker can register it and include arbitrary code that runs with the developer’s privileges, exposing keys, tokens, and environment variables. This mirrors typosquatting but relies on consistent model errors rather than human typos.

Among the registered names, metro-evaluator on npm contained malicious code published in four versions on 7 December 2025 and removed five days later. npm replaced it with a security-hold placeholder. The package had been suggested by the tested models a total of ten times. Another name, css-color-stop, was registered after the list became public and contains only a 53-byte package.json file with no executable code.

Four other occupied names belong to legitimate but unrelated projects: odf, lusid, usr, and ssh-keys. The odf package on PyPI receives nearly 5,000 downloads per month and is unrelated to the OpenDocument library developers likely intended. The real weaviate client is published under weaviate-client, while the brand owner maintains an empty placeholder under the hallucinated name.

Earlier research cited in the report found hallucination rates of 19.7% across 16 models and 576,000 code snippets. Commercial models averaged 5.2% while open-source models reached 21.7%. A separate study of five newer models reported rates between 4.62% and 6.10%. One documented case showed the empty huggingface-cli package on PyPI accumulating over 30,000 downloads after an incorrect command appeared in an Alibaba repository.

AI coding agents increase the risk because they can execute installation commands autonomously. In one campaign, the name react-codeshift appeared in 47 generated files and spread to more than 237 repositories. Researchers demonstrated prompt-injection techniques that tricked agents into requesting attacker-controlled package names with success rates up to 100% on tools including Cursor, Windsurf, and GitHub Copilot.

Registry operators already block many hallucinated names through normalization and prohibition lists, leaving approximately 53 names still available for registration. The study emphasizes that developers and team leads should require human approval before AI agents install dependencies and should inspect package metadata with commands such as npm view or PyPI JSON endpoints before installation.

Related articles

Habr•Supply Chain & Open Source

Polymarket Suffers Supply Chain Attack via Compromised DebugBear Monitoring Script

Attackers compromised DNS records of DebugBear, a real user monitoring provider, to inject malicious JavaScript into Polymarket pages. The script extracted wallet data and trading credentials from browser storage, then used the platform's official relayer to execute unauthorized withdrawals totaling approximately $2.7 million across 737 wallets. No smart contract vulnerabilities were exploited; all 985 unauthorized transactions carried valid user signatures. The incident occurred on October 29 and was resolved within an hour after trading was halted, with Polymarket returning $3.9 million including compensation. This attack class matches the 2023 Ledger Connect Kit compromise, highlighting risks from third-party scripts in browser sessions. Polymarket has since committed to stricter CSP policies, script pinning, and sandboxing. The case underscores that browser-based sessions with full API privileges remain a critical trust boundary in crypto platforms.

Habr•Supply Chain & Open Source

Approved Stamp: How Container Images Pass Rigorous Security Checks Before Reaching Production

DevSecOps engineer Vitaly Matveev from ecom.tech describes a comprehensive lifecycle process for securing Docker images from build to deployment. The approach combines base image validation through a centralized manifest, Dockerfile checks via Infra Gate, Security Quality Gate results stored as attestations in Harbor, and cryptographic signing only after all checks pass. Kyverno policies in production Kubernetes clusters enforce signature verification and block unsigned or unapproved images. Daily automated scans of base images using EPSS scoring detect new vulnerabilities and notify responsible platform teams. The system ensures traceability from pipeline ID to running pod while maintaining a developer-centric workflow with clear remediation guidance.

Habr•Supply Chain & Open Source

Passwordless Kubernetes Image Pulling with Artifact Keeper via ServiceAccount Tokens

Kubernetes 1.34 and later enables kubelet to forward a pod's ServiceAccount token to an external image credential provider plugin, allowing the plugin to exchange it for short-lived read-only credentials from a compatible registry. Artifact Keeper, an open-source Rust-based OCI and package registry, implements an OIDC provider that validates these tokens and issues temporary credentials without requiring imagePullSecrets in manifests. The approach follows zero-trust principles by eliminating long-lived secrets that can leak across namespaces or clusters. A custom credential provider binary handles the token exchange, enforces audience restrictions, and redacts sensitive data from logs. The solution requires specific ClusterRole permissions for nodes, kubelet flags, and registry-side OIDC mappings that bind Kubernetes namespaces to read-only groups. Testing on kind 1.34.3 confirmed successful pulls for authorized ServiceAccounts and clear 401 errors for unauthorized ones when imagePullPolicy is set to Always.

Security NEXT•Supply Chain & Open Source

Malicious Code Injected into LiteLLM Open Source AI Package via Supply Chain Attack

The open-source generative AI tool LiteLLM had malicious code inserted into its official distribution packages, enabling credential theft and remote code execution. The compromise affected version 1.107.0 released on October 21, 2026, and was delivered through legitimate channels in a classic software supply chain attack. Seven malicious wheel files were uploaded to PyPI, while official container images on Docker Hub and GitHub Container Registry were also tainted. Security firm JFrog discovered that the malware steals a wide range of secrets including cloud credentials, SSH private keys, browser-stored passwords, development tokens, and AI service API keys from LiteLLM's database. The code also supports execution of externally fetched payloads and abuses Python's startup mechanisms to run even when the application itself is not loaded. This marks the second supply chain incident involving the project in 2026, following a separate event in March.