Skip to content

Secure IT

Stay Secure. Stay Informed.

Primary Menu
  • Home
  • Sources
    • Krebs On Security
    • Security Week
    • The Hacker News
    • Schneier On Security
  • Home
  • Security Week
  • AI Hallucinations Create a New Software Supply Chain Threat
  • Security Week

AI Hallucinations Create a New Software Supply Chain Threat

Ionut Arghire Published: April 14, 2025 | Updated: April 14, 2025 2 min read
0 views

Package hallucinations represent a common issue within code-generating Large Language Models (LLMs) that opens the door for a new type of supply chain attack, researchers from three US universities warn.

Referred to as ‘slopsquatting’, package hallucination occurs when the code generated by a LLM recommends or references a fictitious package.

Researchers from the University of Texas at San Antonio, University of Oklahoma, and Virginia Tech warn that threat actors can exploit this by publishing malicious packages with the hallucinated names.

“As other unsuspecting and trusting LLM users are subsequently recommended the same fictitious package in their generated code, they end up downloading the adversary-created malicious package, resulting in a successful compromise,” the academics explain in a recently publishedresearch paper (PDF).

Considered a variation of the classical package confusion attack, slopsquatting could lead to the compromise of an entire codebase or software dependency chain, as any code relying on the malicious package could end up being infected.

The academics show that, out of 16 popular LLMs for code generation, none was free of package hallucination. Overall, they generated 205,474 unique fictitious package names. Most of the hallucinated packages (81%) were unique to the model that generated them.

For commercial models, hallucinated packages occurred in at least 5.2% of cases, and the percentage jumped to 21.7% for open source models. These hallucinations are often persistent within the same model, as 58% would repeat within 10 iterations.

The academics also warn that, while the risk of LLMs recommending malicious or typosquatted packages has been documented before, it was considered low, and that the concept of package hallucinations was not considered. With the rapid evolution of Gen-AI, the risks linked to its use have also escalated.

Advertisement. Scroll to continue reading.

The researchers conducted 30 tests (16 for Python and 14 for JavaScript) to produce a total of 576,000 code samples. During evaluation, the models were prompted twice for package names, resulting in a total of 1,152,000 package prompts.

“These 30 tests generated a total of 2.23 million packages in response to our prompts, of which 440,445 (19.7%) were determined to be hallucinations, including 205,474 unique non-existent packages,” the academics note.

The academics also discovered that the models were able to detect most of their own hallucinations, which would imply that “each model’s specific error patterns are detectable by the same mechanisms that generate them, suggesting an inherent self-regulatory capability.”

To mitigate package hallucination, the researchers propose prompt engineering methods such as Retrieval Augmented Generation (RAG), self-refinement, and prompt tuning, along with model development techniques such as decoding strategies or supervised fine-tuning of LLMs.

Related: AI Now Outsmarts Humans in Spear Phishing, Analysis Shows

Related: Vulnerabilities Expose Jan AI Systems to Remote Manipulation

Related: Google Pushing ‘Sec-Gemini’ AI Model for Threat-Intel Workflows

Related:Microsoft Bets $10,000 on Prompt Injection Protections of LLM Email Clien

About The Author

Ionut Arghire

See author's posts

Original post here

What do you feel about this?

  • Security Week

Post navigation

Previous: ⚡ Weekly Recap: Windows 0-Day, VPN Exploits, Weaponized AI, Hijacked Antivirus and More
Next: Phishing Campaigns Use Real-Time Checks to Validate Victim Emails Before Credential Theft

Author's Other Posts

Insurance Firm Lemonade Says API Glitch Exposed Some Driver’s License Numbers Cybersecurity_News-SecurityWeek.jpg

Insurance Firm Lemonade Says API Glitch Exposed Some Driver’s License Numbers

April 15, 2025 0 2
Kidney Dialysis Services Provider DaVita Hit by Ransomware ransomware.jpeg

Kidney Dialysis Services Provider DaVita Hit by Ransomware

April 15, 2025 0 0
Conduent Says Names, Social Security Numbers Stolen in Cyberattack Cybersecurity_News-SecurityWeek.jpg

Conduent Says Names, Social Security Numbers Stolen in Cyberattack

April 15, 2025 0 0
2.6 Million Impacted by Landmark Admin, Young Consulting Data Breaches Cybersecurity_News-SecurityWeek.jpg

2.6 Million Impacted by Landmark Admin, Young Consulting Data Breaches

April 15, 2025 0 2

Related Stories

Cybersecurity_News-SecurityWeek.jpg
  • Security Week

Insurance Firm Lemonade Says API Glitch Exposed Some Driver’s License Numbers

Ionut Arghire April 15, 2025 0 2
ransomware.jpeg
  • Security Week

Kidney Dialysis Services Provider DaVita Hit by Ransomware

Ionut Arghire April 15, 2025 0 0
Cybersecurity_News-SecurityWeek.jpg
  • Security Week

Conduent Says Names, Social Security Numbers Stolen in Cyberattack

Ionut Arghire April 15, 2025 0 0
Cybersecurity_News-SecurityWeek.jpg
  • Security Week

2.6 Million Impacted by Landmark Admin, Young Consulting Data Breaches

Ionut Arghire April 15, 2025 0 2
VC-Funding_China-tech.jpg
  • Security Week

China Pursuing 3 Alleged US Operatives Over Cyberattacks During Asian Games

Associated Press April 15, 2025 0 0
Satellite-Link-Cybersecurity.jpg
  • Security Week

Blockchain, Quantum, and IoT Firms Unite to Secure Satellite Communications Against Quantum Threats

Kevin Townsend April 15, 2025 0 1

Trending Now

$13.74M Hack Shuts Down Sanctioned Grinex Exchange After Intelligence Claims grinex.jpg 1

$13.74M Hack Shuts Down Sanctioned Grinex Exchange After Intelligence Claims

April 19, 2026 0 0
Mirai Variant Nexcorium Exploits CVE-2024-3721 to Hijack TBK DVRs for DDoS Botnet botnet-ddos.jpg 2

Mirai Variant Nexcorium Exploits CVE-2024-3721 to Hijack TBK DVRs for DDoS Botnet

April 19, 2026 0 0
Three Microsoft Defender Zero-Days Actively Exploited; Two Still Unpatched defender.jpg 3

Three Microsoft Defender Zero-Days Actively Exploited; Two Still Unpatched

April 19, 2026 0 0
Google Blocks 8.3B Policy-Violating Ads in 2025, Launches Android 17 Privacy Overhaul google-ads-android.jpg 4

Google Blocks 8.3B Policy-Violating Ads in 2025, Launches Android 17 Privacy Overhaul

April 19, 2026 0 0

Connect with Us

Social menu is not set. You need to create menu and assign it to Social Menu on Menu Settings.

Trending News

$13.74M Hack Shuts Down Sanctioned Grinex Exchange After Intelligence Claims grinex.jpg 1
  • The Hacker News

$13.74M Hack Shuts Down Sanctioned Grinex Exchange After Intelligence Claims

April 19, 2026 0 0
Mirai Variant Nexcorium Exploits CVE-2024-3721 to Hijack TBK DVRs for DDoS Botnet botnet-ddos.jpg 2
  • The Hacker News

Mirai Variant Nexcorium Exploits CVE-2024-3721 to Hijack TBK DVRs for DDoS Botnet

April 19, 2026 0 0
Three Microsoft Defender Zero-Days Actively Exploited; Two Still Unpatched defender.jpg 3
  • The Hacker News

Three Microsoft Defender Zero-Days Actively Exploited; Two Still Unpatched

April 19, 2026 0 0
Google Blocks 8.3B Policy-Violating Ads in 2025, Launches Android 17 Privacy Overhaul google-ads-android.jpg 4
  • The Hacker News

Google Blocks 8.3B Policy-Violating Ads in 2025, Launches Android 17 Privacy Overhaul

April 19, 2026 0 0
NIST Limits CVE Enrichment After 263% Surge in Vulnerability Submissions nist-cve.jpg 5
  • The Hacker News

NIST Limits CVE Enrichment After 263% Surge in Vulnerability Submissions

April 17, 2026 0 1
Operation PowerOFF Seizes 53 DDoS Domains, Exposes 3 Million Criminal Accounts europol.jpg 6
  • The Hacker News

Operation PowerOFF Seizes 53 DDoS Domains, Exposes 3 Million Criminal Accounts

April 17, 2026 0 0
Apache ActiveMQ CVE-2026-34197 Added to CISA KEV Amid Active Exploitation apachemq.jpg 7
  • The Hacker News

Apache ActiveMQ CVE-2026-34197 Added to CISA KEV Amid Active Exploitation

April 17, 2026 0 0

You may have missed

grinex.jpg
  • The Hacker News

$13.74M Hack Shuts Down Sanctioned Grinex Exchange After Intelligence Claims

[email protected] The Hacker News April 19, 2026 0 0
botnet-ddos.jpg
  • The Hacker News

Mirai Variant Nexcorium Exploits CVE-2024-3721 to Hijack TBK DVRs for DDoS Botnet

[email protected] The Hacker News April 19, 2026 0 0
defender.jpg
  • The Hacker News

Three Microsoft Defender Zero-Days Actively Exploited; Two Still Unpatched

[email protected] The Hacker News April 19, 2026 0 0
google-ads-android.jpg
  • The Hacker News

Google Blocks 8.3B Policy-Violating Ads in 2025, Launches Android 17 Privacy Overhaul

[email protected] The Hacker News April 19, 2026 0 0
Copyright © 2026 All rights reserved. | MoreNews by AF themes.