Skip to content

⚠️ SECURITY RESEARCH PROJECT ⚠️ This is a proof-of-concept demonstrating "slopsquatting"

License

Notifications You must be signed in to change notification settings

groovecoder/arangoql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArangoQL - Proof-of-Concept

⚠️ SECURITY RESEARCH PROJECT ⚠️

GitHub: github.com/groovecoder/arangoql NPM: npmjs.com/package/arangoql

What is this?

This is a proof-of-concept demonstrating "slopsquatting" - a supply chain attack vector where:

  1. An LLM (like ChatGPT, Claude, etc.) hallucinates a package name
  2. A developer trusts the LLM and runs npm install <hallucinated-name>
  3. An attacker has registered that hallucinated name with malicious code
  4. The malicious code runs on the developer's machine

This package is harmless - it only displays a warning message. But it proves that if you installed this by mistake, malicious code could have:

  • Stolen your environment variables (API keys, secrets)
  • Exfiltrated source code
  • Modified your files
  • Installed backdoors

Did you mean arangojs?

If an LLM suggested you install "arangoql" for ArangoDB support, it likely meant the official package: arangojs

To fix this:

npm uninstall arangoql
npm install arangojs

Using this package (for research)

If you intentionally want to use this proof-of-concept:

const ArangoQL = require('arangoql');

const db = new ArangoQL({
  url: 'http://localhost:8529',
  database: '_system',
  username: 'root',
  password: ''
});

// Execute AQL queries
const result = await db.query('FOR doc IN myCollection RETURN doc');

// Work with collections
const users = db.collection('users');
await users.save({ name: 'Alice', age: 30 });
await users.find({ name: 'Alice' });
await users.remove('user-key');

Note: This is a minimal implementation. For production use, use the official arangojs package.

Why does this matter?

The Problem

  • LLMs are increasingly used for coding assistance
  • They sometimes "hallucinate" package names that don't exist
  • Developers often trust and execute LLM suggestions without verification
  • Attackers can register these hallucinated names preemptively

Real-world examples

  • Typosquatting: crossenv instead of cross-env (malicious version downloaded 700k+ times)
  • Dependency confusion attacks on major companies
  • Supply chain compromises through package registries

How to protect yourself

  1. Verify package names - Check npm before installing
  2. Review install scripts - Check package.json for postinstall hooks
  3. Check package stats - Look at download counts, age, and maintainers
  4. Use lock files - Prevent unexpected package resolution
  5. Audit dependencies - Use tools like npm audit and Snyk
  6. Don't blindly trust LLMs - Verify all suggestions

Educational Resources

License

MIT License - This is an educational/research project.

Contributing

Found a way to improve this proof-of-concept? Pull requests welcome!

Visit the repository: github.com/groovecoder/arangoql

Disclaimer

This package is for educational and research purposes only. It contains no malicious code and only displays warning messages. The author is not responsible for misuse of this concept.

About

⚠️ SECURITY RESEARCH PROJECT ⚠️ This is a proof-of-concept demonstrating "slopsquatting"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published