This reminds me of the new vector for malware that targets “vibe coders”. LLMs tend to hallucinate libraries that don’t exist. Like, it’ll tell you to add, install, and use jjj_image_proc or whatever. The vibe coder will then get an error like “that library doesn’t exist” and "can’t call jjj_image_proc.process()`.
But you, a malicious user, could go and create a library named jjj_image_proc and give it a function named process. Vibe coders will then pull down and run your arbitrary code, and that’s kind of game over for them.
You’d just need to find some commonly hallucinated library names
It’s taught me that bigger standard libraries are better. You still have similar issues, but at least nobody’s importing LeftPad. And your remaining dependency probably isn’t importing LeftPad either.
Wait til you hear about npm.
This reminds me of the new vector for malware that targets “vibe coders”. LLMs tend to hallucinate libraries that don’t exist. Like, it’ll tell you to add, install, and use jjj_image_proc or whatever. The vibe coder will then get an error like “that library doesn’t exist” and "can’t call jjj_image_proc.process()`.
But you, a malicious user, could go and create a library named
jjj_image_proc
and give it a function namedprocess
. Vibe coders will then pull down and run your arbitrary code, and that’s kind of game over for them.You’d just need to find some commonly hallucinated library names
As a Typescript developer, npm is a damn mess. I ain’t got a clue how to handle these dependencies.
It’s taught me that bigger standard libraries are better. You still have similar issues, but at least nobody’s importing LeftPad. And your remaining dependency probably isn’t importing LeftPad either.