A new supply chain attack called 'slopsquatting' has emerged, exploiting generative AI coding tools that recommend non-existent packages. Named by security researcher Seth Larson, this attack differs from typosquatting as it distributes malicious packages on repositories like PyPI or npm using fake names commonly hallucinated by AI in coding examples. Research from March 2025 analyzing 576,000 Python and JavaScript code samples found about 20% recommended packages that don't exist. While open-source LLMs like CodeLlama, DeepSeek, WizardCoder, and Mistral showed worse performance, commercial tools like ChatGPT-4 still exhibited a significant 5% error rate.
Among over 200,000 hallucinated package names, 43% consistently repeated across similar prompts, and 58% reappeared at least once in ten runs. The study revealed that 38% of these hallucinated names appeared inspired by real packages, 13% resulted from typos, and 51% were completely fabricated. Researchers from cybersecurity firm Socket warn that while no attacks exploiting this vulnerability have been observed yet, these hallucinated package names are common, repeatable, and semantically plausible, creating a predictable attack surface that could be easily weaponized.
AI 코딩 도구의 환각(hallucination) 현상을 악용한 새로운 공급망 공격 방식인 ‘슬롭스쿼팅(Slopsquatting)’이 보안 위협으로 떠오르고 있다. 이는 기존 ‘타이포스쿼팅’과 달리 오타를 이용하지 않고, AI가 만들어낸 존재하지 않는 패키지명을 실제로 등록해 악성코드를 배포하는 방식이다. 2025년 3월 발표된 패키지 환각 연구에 따르면 조사된 57만 6천개의 파이썬과 자바스크립트 코드 샘플 중 약 20%가 존재하지 않는 패키지를 추천했다. 코드라마, 딥시크, 위저드코더, 미스트랄 같은 오픈소스 LLM에서 상황이 더 심각했지만, 챗GPT-4 같은 상용 도구도 약 5%의 오류율을 보였다.
연구에서 발견된 20만 개 이상의 환각 패키지명 중 43%는 비슷한 명령에서 일관되게 반복되었고, 58%는 10회 실행 중 최소 한 번 이상 재등장했다. 연구 결과 이런 환각 패키지 중 38%는 실제 패키지에서 영감을 받은 것으로 보이며, 13%는 오타 결과, 나머지 51%는 완전히 만들어낸 것으로 나타났다. 오픈소스 사이버보안 기업 소켓(Socket)의 연구진은 아직 이 공격 유형을 악용한 사례는 없지만, 환각 패키지명이 일반적이고 반복 가능하며 의미적으로 그럴듯해 쉽게 무기화될 수 있는 예측 가능한 공격 표면을 만든다고 경고했다.
