chiprook
← Security
SecurityOctober 27, 2026, 09:53

1 in 5 AI Code Samples Recommends a Package That Doesn't Exist

A USENIX Security 2025 study of 2.23 million code samples from 16 models found 19.7% contained at least one non-existent package. Open-weight models hallucinated at 21.7% versus 5.2% for commercial ones, and 127 invented names are shared identically across five frontier models.

1 in 5 AI Code Samples Recommends a Package That Doesn't Exist
#PyPI#Npm#OpenAI
Read next
Security

phantom-deps scans AI-generated code for hallucinated packages

Security

Omnis Watchtower: a Claude Code plugin that vets packages before install

Security

MemTensor packages poisoned: AI memory plugin steals developer credentials

Security

Slopsquatting: AI agents install packages attackers registered in advance