iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Fake AI packages are software-library names a code model invents, rather than names it verifies against a live package registry. If an attacker publishes malware under one of those unused names, a developer or coding agent can install it by following the model’s suggestion. That attack is called slopsquatting. It is one route into the software supply chain, alongside lookalike packages, compromised maintainer accounts, malicious model files and unsafe agent extensions.
The scale is measurable, but easy to misstate: a USENIX Security 2025 study found that 19.7% of package recommendations in its 2024-era test corpus did not exist when checked. That is not a current miss rate for a particular AI product, and a hallucinated name is not automatically malicious. The risk appears when someone claims the name—or when an agent installs a dependency without a person checking it.
What is a fake AI package?
A fake AI package, more precisely a hallucinated package, is a package name generated by an AI coding tool that does not correspond to a real package when the model suggests it. It may look like a sensible library or command-line tool. The model has produced a plausible identifier, not confirmed that the project exists or that the name is legitimate.
Language models generate likely continuations of text. Unless a tool explicitly looks up a package in a registry, the model is not checking npm, PyPI or another live catalogue as it writes. A name can therefore sound familiar and fit the surrounding code while being entirely invented. Higher sampling temperature can increase this kind of error, but making output deterministic does not eliminate persistent hallucinations.
Popular on Amazon
- 【90 Degree Full Function USB C Adapter】Supports the latest USB4 standard for up to 40Gbps of bandwidth, 8K video support, and up to 240W Fast charging; Support USB PD 3.1 Extended Power Range (EPR) including 140W, 180W and 240W. Your productivity is easily doubled. *Warm Tip: For the best fit, please make sure the USB-C port is fully exposed; thick or bulky cases may affect compatibility.
- 【Reliable Quality】Made from high-quality, scratch-resistant aluminum alloy, delicate metal frame. get excellent wear resistance and heat dissipation. Non-Slip Design for easier insertion and removal.
- 【Small and portable】Ultra thin size, ultra compact design, a petite physique that matches the minimalist design of your modern laptops. Coming with a slim figure that won't block the port next to the one it's plugged into.
- 【Compatibility】Widely work with most usb c, thunderbolt 4/3 devices. Compatibilit for ROG Ally, Steam Deck, Switch, MacBook Pro, Quest 3 VR headset, Surface Book 2, iPhone 18/17/16/15, Samsung Galaxy S23/S22/S21, Note 20/10, Google Pixel, ChromeBook, etc.
- 【Excellence Customer Support】If you experience any issues or cable failure, simply reach out to our dedicated customer service team. We provide a prompt response within 18 hours, providing you with the necessary technical support to resolve any concerns.
Examples of plausible-but-wrong names include huggingface-cli, unused-imports, react-codeshift and css-color-stop. A name can also conflate or resemble existing projects. For example, Hugging Face’s CLI is included with huggingface_hub; the relevant installation command is pip install -U "huggingface_hub[cli]", not installing a separate package named huggingface-cli.
Hallucination is a model error, not proof of an attack. An attacker may notice that a model repeatedly recommends an unused name, register that name on a public registry, and publish code under it. That conversion of an AI-invented name into a package trap is slopsquatting—a blend of “slop” and “squatting.” Seth Michael Larson, security developer-in-residence at the Python Software Foundation, coined the term.
How often do AI models invent packages?
In the largest study described here, the answer depends on the test and the models examined. The USENIX Security 2025 paper by Spracklen and co-authors analysed 576,000 code samples from 16 models for Python and JavaScript, identifying 2.23 million package recommendations. Of those recommendations, 440,445, or 19.7%, referred to names that did not exist; they represented 205,474 unique nonexistent names.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →That study tested models available as of 20 January 2024. Its 19.7% figure is the share of recommendations in that study’s corpus—not the current error rate of a named assistant, a coding agent, or every package suggestion a developer receives. Within the study, commercial and GPT-series models had a 5.2% hallucination rate, open-source models 21.7%, and GPT-4 Turbo the lowest reported rate, 3.59%. Python recommendations had a 15.8% rate and JavaScript 21.3% in that cohort.
The study also found a reason the invented names could be attractive to attackers: repetition. Researchers re-ran 500 prompts 10 times each. Forty-three percent of the hallucinated names appeared in all 10 runs; 58% appeared more than once, while 39% never repeated. In the authors’ words, “a majority of hallucinations are not simply random errors.” A name that consistently comes back for the same request is easier to anticipate and reserve than a one-off string.
Also popular on Amazon
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
A 2026 re-evaluation by Aleksandr Churilov, covered by Socket, tested five newer models across 199,845 responses from 22–28 April. Reported rates ranged from 4.62% to 6.10%, and 127 invented names were shared across all five models. After reviewers removed false positives and PyPI Security blocked some names, 53 remained registrable in April 2026: 41 on PyPI and 12 on npm. This was a preprint, not a peer-reviewed study; it tested one response per prompt rather than full coding-agent workflows, and its extraction method could misclassify framework imports. It is evidence that the problem persisted, not a definitive ranking of current tools.
The older and newer percentages should not be compared as if they were a controlled product benchmark: the models, dates and methods differ. The practical takeaway is narrower and more durable: models can invent dependencies, some names recur, and a live registry check does not establish that a package is safe.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesHow does a slopsquatting attack work?
The attacker relies on the victim—or an autonomous coding tool—turning a plausible suggestion into an install command. Once the malicious package has been published under the suggested name, the package manager may retrieve it just as it would an ordinary dependency.
- Collect likely names. An attacker asks public models routine programming questions and records the package names in their answers.
- Check for unused names. Names absent from npm or PyPI are candidates. Attackers can repeat prompts to find suggestions that recur.
- Publish a package. The attacker registers one or more names and uploads code. An empty or harmless package can also be used to test whether people will install it; publication alone does not prove it contains malware.
- Wait for a matching suggestion. A later developer asks a similar question, receives the same name, and adds it to a project or runs the suggested install command.
- Run or import the code. Depending on the language and package, malicious activity may happen during installation, when the package is imported, or when a tool inside it is run.
The published USENIX paper tested a threat model in which users trusted model output and installed a suggested package without verification. An attacker did not need to change model weights; the attacker could use the same public models to discover candidate names.
A registry lookup is useful before a name is claimed, but it is not a safety check after publication. Once a malicious package exists under the exact name, a simple “does this package exist?” check returns yes. As the USENIX authors put it, “Trivial cross-referencing methods (i.e., comparing a generated package name with a list of known packages) are ineffective for detecting a package hallucination attack, as an adversary may already have published the hallucinated package with malicious code.”
Also popular on Amazon
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Package installation can create several opportunities for code to run. Python source distributions may run build code during pip install. npm packages have historically used lifecycle scripts such as preinstall and postinstall; npm 12 blocks dependency install scripts by default unless a project approves them, but this does not make later imports or execution safe. Malware may seek credentials or files available to the developer account, including cloud keys, source code, SSH keys and package-publishing tokens.
How is slopsquatting different from other package attacks?
These attacks all exploit trust in a dependency, but they target different weak points. The distinction matters because a spelling check or existence check will not catch every type.
| Attack | What it exploits | Did the name exist before the attack? | What may catch it—and what may not |
|---|---|---|---|
| Slopsquatting | A name invented by a model | No; the attacker publishes it after the model suggests it | Checking that a name exists fails once it is registered. Review the project and publisher, not just the spelling. |
| Typosquatting | A human’s misspelling of a popular package | A lookalike of an established name exists | Careful typing and similarity detection can help, but a plausible-looking package still needs review. |
| Dependency confusion | Registry or namespace resolution that lets a public package win over an internal one | A public package is created to match an internal name | Explicit registry and namespace configuration helps; spelling checks do not solve registry-order problems. |
| Compromised legitimate package | A maintainer account, CI system or publishing credential | Yes; the package is already trusted and used | Lockfiles, release-age controls, MFA and provenance checks reduce some risks, but do not prove the publisher is uncompromised. |
These categories can overlap in practice. A malicious package can be a lookalike, an invented name, or a compromised release in a real project. The broader supply-chain pattern is that code reaches the victim through something they already trust: a registry, dependency, publisher account, CI credential, model hub, IDE extension, agent server or skill marketplace.
What has happened beyond invented package names?
Slopsquatting is only one path into AI-assisted development. Recent incidents show why “the model did not invent this package” is not enough to establish safety.
- Hijacked real packages and worms: In August 2025, malicious Nx releases prompted local AI command-line tools to search for secrets and led to stolen data being placed in public GitHub repositories. A reported investigation counted data from 2,180 accounts and 7,200 repositories across three phases; the malicious versions were live for about four hours. The Shai-Hulud npm worm’s first wave affected more than 500 packages, according to CISA; a second wave involved about 700 packages and more than 25,000 repositories containing stolen secrets, according to Wiz.
- Malicious releases in an AI-adjacent dependency: LiteLLM was compromised twice in 2026. Versions 1.82.7 and 1.82.8 appeared on PyPI on 24 March and were available for about 40 minutes; a later reconstruction estimated potential exposure at more than 2,000 organizations, which is not a count of confirmed compromises. In October, version 1.107.0 was available for roughly 1 hour 45 minutes to two hours. Its stealer ran at Python startup even if LiteLLM was never imported, and uninstalling did not remove startup files. Neither incident involved tampering with model weights or training data.
- Model files: Pickle and some PyTorch files can execute code when loaded. JFrog found about 100 malicious Hugging Face model files in February 2024. By April 2025, a scanning effort by Protect AI and Hugging Face had examined 4.47 million model versions in 1.41 million repositories and flagged 352,000 unsafe or suspicious issues across 51,700 models. Safer formats and loading modes help, but they do not replace provenance and review: malicious instructions can also be hidden in model metadata or templates.
- MCP servers and skills: A server or agent skill may have permission to read files, send messages or call tools. In one reported MCP incident, a package installed a rogue server whose tool descriptions instructed assistants to seek SSH keys, cloud credentials and
.envfiles. A separate ClawHub audit by Koi Security found 341 malicious skills among 2,857 examined; Antiy CERT reported at least 1,184 malicious skills in its own count, including 677 attributed to one author. These are different audits and should not be combined into a single estimate. - Agent-driven installs: Coding agents can choose and install dependencies with little human review. Bloom Security reported in October 2026 that more than 1,500 npm packages had Trusted Publishing configurations bound to reclaimable GitHub owner/repository slugs rather than immutable repository IDs. The packages had more than 10 million total downloads. The issue did not require stolen credentials; an abandoned slug could be reclaimed. npm later changed its handling so unvalidated trusted-publishing configurations expire if unused within 48 hours, according to Bloom’s account of the change.
These examples show why familiar safeguards have limits. A valid signature can be produced with a stolen CI token. A legitimate package can be compromised. A scanner can miss a new or disguised payload. An agent can turn a questionable suggestion into a dependency before a person sees the change.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Also popular on Amazon
- Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
- Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
- 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
- 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
- Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.
How can you check an AI-suggested package before installing it?
Treat a suggested dependency like an untrusted link: verify the identity and purpose of the project before adding it. Do this even when the package name exists and the code sample looks convincing.
- Confirm the exact name and the intended project. Search the package’s official registry entry and its linked source repository. Check whether the project’s own documentation recommends that package and installation command. Do not infer legitimacy from a familiar brand-like name.
- Inspect the publisher and history. Check the package owner, first-upload date, release history, repository link and whether the project has a credible maintenance history. A brand-new package claiming to be a standard library deserves extra scrutiny. For npm, one useful metadata check is
npm view <name> name version time.created. The creation date is a clue, not a verdict: a new legitimate project can exist, and an old package can be compromised. - Compare with authoritative documentation. If the model says a package provides a framework feature, find that feature in the framework’s or project’s own documentation. Check whether the library is actually needed; the code may work with a built-in API or a dependency already present.
- Review what the package will execute. Inspect installation scripts, build configuration, source code and dependency changes. Be cautious about scripts that reach the network, read secrets or execute opaque binaries. A small source package can still run code at build or import time.
- Make the change reviewable. Add a dependency in a pull request, explain why it is needed, and have someone other than the person who prompted the AI approve new direct dependencies. Do not give an agent blanket permission to install packages or read developer credentials.
- Use reproducible installs. Commit and review the lockfile. For npm projects, use
npm ciin CI so the install follows the lockfile rather than resolving a fresh dependency tree. For Python, use a hash-locked requirements file withpip install --require-hashes --only-binary :all: -r requirements.txtwhere the project’s packaging needs allow it. Hashes and lockfiles help ensure you get the reviewed artifact; they do not certify that it is benign.
For the specific hallucination example, do not install huggingface-cli simply because an answer names it. Verify the official installation instructions and use the documented huggingface_hub extra instead. The wider lesson is to verify the project and the command, not merely to substitute a similar-looking name.
What should organizations change in their build and agent workflows?
Organizations should put controls at the point where dependencies are approved, resolved and executed. Model-side improvements can reduce some errors, but teams cannot assume every employee or coding agent uses the same model or configuration.
- Put a registry proxy or mirror in front of public registries. An internal proxy can enforce approved sources, log attempted installs and let a team mirror only packages it is willing to use. Repeated failed lookups are useful signals: a model may be repeatedly suggesting an unavailable name, and those misses can later become attractive names to squat.
- Set a release-age policy. A cooldown delays installation of very new releases and gives responders time to identify suspicious uploads. It is a delay, not a guarantee: an attacker can register a name and wait out the cooldown.
- Control install scripts and agent permissions. Consider
ignore-scripts=truein CI and agent environments, with explicit approvals for packages that require scripts. Run agents in isolated environments without access to home-directory credentials, SSH keys, cloud keys or production secrets. Require approval for new dependencies rather than letting an agent install them invisibly. - Protect publishing credentials. Use phishing-resistant MFA, short-lived and narrowly scoped tokens, and trusted publishing or OIDC where available. Revoke and rotate every affected credential after exposure, not only the key believed to have been used. Trusted publishing still depends on the integrity of the bound repository and CI workflow.
- Scan behavior, not only names and known vulnerabilities. Name checks and vulnerability databases do not reliably catch a newly published malicious package with no prior report. Combine source and behavior analysis with human review; understand that scanners can be evaded.
- Inventory the software and models you use. Maintain a software bill of materials and, where relevant, inventories for AI models and agent components. Pin model artifacts by hash and use verified publishers. Prefer non-executable model formats such as Safetensors when suitable; PyTorch 2.6 made weights-only loading the default in January 2025, but model templates and other components still require review.
- Approve MCP servers and skills as third-party code. Review their permissions and tool descriptions, pin versions or hashes where possible, and alert on changes. A skill inherits the agent’s capabilities, so limiting the agent’s access limits the damage a malicious skill can do.
For organizations subject to the EU Cyber Resilience Act, reporting obligations began on 11 September 2026: the cited guidance describes a 24-hour early warning and a 72-hour notification. Accurate component inventories and incident-response procedures make those deadlines more achievable.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWhat should you remember about fake AI packages?
A hallucinated package is an invented name; slopsquatting is an attacker’s decision to publish under that name and wait for a victim to install it. The 19.7% figure from USENIX Security 2025 describes one large, older study—not the current accuracy of a particular assistant. Some invented names recur, which makes them discoverable and potentially worth registering.
Also popular on Amazon
- 【Read before You Buy】 Note: This adapter is USB 2.0 version and cannot transmit HDM, VGA, or other video signals. Nevertheless, they are fully capable of charging devices,duplicating files, and can be seamlessly integrated with USB-C earphones, wireless network adapters, and SD card adapters.
- 【Easy to Use and Safe】Thanks to modern manufacturing techniques, we've made these adapters sufficiently compact so that they can remain inserted in your device without noticeable protrusion or inconvenience. This means you don't have to constantly plug and unplug them, reducing the likelihood of wear and misalignment, and making them more convenient to carry around.
- 【Reliable Quality】Engineered for enhanced durability, durable aluminum alloy shell material,get excellent wear resistance and heat dissipation,the male USB C and female USB connectors & the male USB and female USB C connectors are designed to be plugged and unplugged up to 20000 times. Provides data transfer, device charging, memory space expansion, and additional computer peripherals.
- 【Think more for you】Do you need to connect a USB-C-enabled device to an odd device that only has USB-A ports? Then these USB-A male to USB-C female adapters are made for you.Simply insert the adapter into the USB-A port on the device, and you can instantly connect your USB-C device to the device that originally didn't have the correct connection port.
- 【Trusted xiwxi Quality and Service】As a responsible brand seller, you will receive xiwxi's 12-month Quality assurance and lifetime friendly customer service, you're not just buying a product,you're investing in peace of mind with all-round quality and exceptional customer service.
Checking that a package exists is necessary but insufficient: a malicious package can exist, and a compromised release can use a trusted name. Verify the project and publisher, review new dependencies, lock the versions you approve, limit install-time execution and keep coding agents away from secrets. These controls also address the broader supply-chain attacks that can reach developers through real packages, model files and agent extensions.
Frequently Asked Questions
Why did my AI tell me to install a package that does not exist?
The model may have generated a plausible package name from patterns in its training data instead of checking a live registry. Treat the failed install as a signal to verify the feature in the project’s official documentation, not as a reason to search for a similar name and install the first match.
Can an AI coding agent install a package without asking me?
That depends on the agent’s permissions, configuration and environment; some workflows let an agent run shell commands or edit dependency files. Check its approval settings and isolate it from personal or production credentials before allowing it to run package-manager commands.
Recommended Free Tools
Does a signed package prove that it is safe?
No. A signature can help establish how an artifact was built or published, but it does not guarantee benign code or an uncompromised publisher. A stolen CI credential can also be used to produce a properly signed malicious release.
What should I do if I already installed a suspicious package?
Stop using the affected environment and follow your organization’s incident process. Preserve relevant logs, inspect what ran, and rotate credentials the environment could access; removing the package alone may not undo changes or revoke stolen secrets.

