Security researchers have identified a novel and insidious software supply chain attack technique dubbed 'slopsquatting.' This method exploits a known weakness in AI coding assistants: their tendency to 'hallucinate' or invent plausible-sounding but non-existent names for software packages and libraries. Threat actors are capitalizing on this by registering these hallucinated names in public package repositories like npm and PyPI. When an unsuspecting developer accepts the AI's flawed suggestion, they inadvertently install a malicious package, compromising their development environment and potentially the entire software project. This attack vector turns a productivity tool into a gateway for malware, creating a new and scalable threat to the software supply chain.
The threat, detailed by security firm Socket, is a variation of typosquatting but is driven by the predictable errors of AI models rather than human typos. The attack works as follows:
python-http instead of the real requests).python-http) in the relevant repository (e.g., PyPI).pip install python-http. The malicious package is downloaded and executed, compromising the developer's machine and potentially injecting malicious code into the application they are building.Socket's research found that different AI models often hallucinate the same fake names, meaning a single malicious 'slopsquatted' package can target users of multiple AI tools simultaneously.
This is a sophisticated social engineering attack where the AI is the unwitting accomplice.
T1195.001 - Compromise Software Supply Chain: Compromise Software Dependencies and Development Tools. Slopsquatting is a new and specific implementation of this technique.T1059.007 - Command and Scripting Interpreter: JavaScript for npm packages or T1059.006 - Command and Scripting Interpreter: Python for PyPI packages.Slopsquatting represents a significant threat because it weaponizes trust in a widely adopted technology. Developers are increasingly relying on AI assistants to boost productivity, and this attack vector exploits that trust. The potential impact is enormous. A single compromised developer machine can lead to stolen source code, stolen credentials for cloud services, or the injection of malicious code into a popular application, affecting all of its users. This attack is highly scalable and difficult to defend against with traditional methods, as it relies on a legitimate user action (installing a package) and the package name has no prior negative reputation.
No specific malicious package names were provided in the source articles.
Detecting slopsquatting requires focusing on the software development lifecycle:
log_sourcePackage manager logs (npm, pip, etc.)command_line_patternnpm install [package-with-typo]otherStatic analysis of dependenciespackage-lock.json, requirements.txt) for suspicious or unknown packages.package-lock.json, poetry.lock, etc.) to ensure that builds are reproducible and only use exact, vetted versions of dependencies. This is a form of M1054 - Software Configuration.package.json, requirements.txt). A second pair of eyes may spot a suspicious package name. This aligns with M1045 - Code Signing principles, but applied to dependency selection.Use dependency pinning and lock files to ensure that only specific, vetted versions of packages are used in builds.
Educate developers about the risk of AI hallucinations and the importance of verifying package names from official sources before installation.
Run build processes in isolated, ephemeral environments with no access to sensitive credentials or networks to limit the impact of a compromised dependency.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
CyberNetSec.io uses automation to assist source monitoring, deduplication, observable extraction, and structured intelligence generation. Published analysis follows human-defined editorial standards and adds defensive context including MITRE ATT&CK, D3FEND, STIX, and Sigma where applicable. Read our editorial policy.
Help others stay informed about cybersecurity threats
Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.
Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.