Target Industry
Indiscriminate, opportunistic targeting.
Overview
Researchers at the University of Texas at San Antonio, University of Oklahoma, and Virginia Tech have uncovered a new software supply chain attack known as ‘slopsquatting’. This concept is based on typosquatting, where threat actors register slightly misspelt versions of legitimate domains. In slopsquatting, however, attackers exploit AI-generated code inaccuracies to introduce malicious packages into software supply chains.
Exploitation
Large language models (LLMs) like GPT-4 can sometimes generate code recommendations that include non-existent or incorrect package names. These inaccuracies, termed ‘hallucinations’, are monitored by threat actors who then register the non-existent package names as malicious packages on popular code repositories like PyPI (Python Package Index) and npm (Node Package Manager for JavaScript). Researchers observed that AI hallucinations can be repeatable, meaning the same incorrect package names can appear multiple times across different queries.
Impact
Slopsquatting may have a significant impact due to its complexity. It introduces malicious packages into software projects, which developers relying on AI-generated code might unknowingly incorporate. This can lead to vulnerabilities and potential breaches, compromising the integrity and security of the software.
Containment, Mitigations & Remediations
Mitigating the threat of slopsquatting involves several strategies to enhance security and vigilance among developers:
- Educate developers about the risks of AI hallucinations and slopsquatting
- Provide clear documentation on how to identify and avoid hallucinated package names
- Implement thorough code reviews to catch any suspicious or non-existent package names before they are integrated into projects
- Regularly check dependencies for authenticity and security; tools like npm audit and pip check can help identify vulnerabilities
- Supplement AI-generated code with manual verification to ensure the accuracy and legitimacy of package names
- Cross-reference AI-generated recommendations with trusted sources and repositories.
Threat Group
Currently, there isn’t a specific threat group identified as being behind slopsquatting attacks.
Further Information













