AI Code Hallucinations Increase the Risk of 'Package Confusion' Attacks
Briefly

Recent research into large language models (LLMs) reveals that a massive number of AI-generated code samples contain references to non-existent third-party libraries, creating significant vulnerabilities in software supply chains. The study discovered that out of 576,000 code samples, 440,000 included 'hallucinated' dependencies, primarily from open-source models. These fictitious dependencies can facilitate dependency confusion attacks, where attackers exploit these inaccuracies by publishing malicious packages under the names of legitimate libraries. If a software package mistakenly selects a malicious version, it can lead to severe security breaches and data theft.
Once the attacker publishes a package under the hallucinated name, containing some malicious code, they rely on the model suggesting that name to unsuspecting developers.
These non-existent dependencies represent a threat to the software supply chain by exacerbating so-called dependency confusion attacks, which use malicious packages that appear legitimate.
Read at WIRED
[
|
]