
Imagine walking into a key shop where, among hundreds of genuine keys on the shelves, someone has slipped in a few fakes. They look perfectly normal, even stamped with a convincing logo — but every time you use one to open your door, it secretly copies your key and sends it to the thief. That, in essence, is what the cyberattack known as TrapDoor achieved when it was discovered in May 2026.
You might have wondered how a handful of developers can build a complex app in just a few months. The secret is they don't write everything from scratch. Just like a car manufacturer doesn't make their own screws, springs, and light bulbs but orders them from specialized suppliers, developers use thousands of ready-made components — small pieces of code written by others and shared freely on virtual shelves called package repositories.
These virtual shelves have names like npm, PyPI, or Maven — platforms where developers can, with a single command, download and plug a component directly into their application. It's fast, efficient, and the backbone of how the entire modern internet is built. The catch? When you trust the shelf, you have to trust every single item on it.
The TrapDoor attackers understood this vulnerability perfectly. They created packages — code components — with names carefully chosen to sound like exactly what a developer would search for: things like "security-check-helper", "dev-audit-utils", or "token-validator-lite". The names sounded professional, trustworthy, even helpful. Some packages even had fake download counts and fabricated positive reviews to appear legitimate.
Once a developer downloaded and integrated one of these components into their application, the hidden code quietly activated in the background. It didn't break anything visible — the app seemed to work fine. Instead, the poisoned component began silently harvesting sensitive data: passwords, access tokens, API keys, and the private keys to cryptocurrency wallets. All of it was sent back to the attackers' servers without anyone noticing.
If classic supply chain attacks already sounded alarming, TrapDoor added a new and previously unseen dimension. The malicious packages contained hidden instructions aimed at AI coding assistants — tools like GitHub Copilot or Cursor that developers increasingly rely on to write and review code. These instructions, invisible to the human eye in the file, were designed to be read by AI systems and to manipulate their suggestions, potentially causing the AI to recommend insecure code or overlook the very malicious elements already present.
In short: the thieves didn't just try to fool humans — they tried to fool the machines helping those humans work. It's the first time we've seen an attack designed to simultaneously compromise both the human developer and their AI assistant.
You might think: "I don't write code, so this doesn't concern me." But consider this: the app you use to pay your bills, the platform where your doctor stores your medical history, the site where you shop — all of them are built from thousands of those little components. If even one of those components was compromised, your data — name, address, payment card details, passwords — could end up in the wrong hands without the company running the service even realizing it happened.
You don't need to understand the technical answers in detail. What matters is that the person managing your technology knows you're asking these questions — because that signals that security matters to you and that they are accountable for it. Sometimes, the most powerful weapon against a cyberattack isn't sophisticated software, but the right question asked at the right moment.