AI assistants and chatbots
19 threatsAn AI assistant reads text and decides what to do. It cannot reliably tell an instruction from its owner apart from any other text it happens to read, such as an email or a web page. This is the root of most of the 19 threats in this area: if anyone can put text in front of the assistant, anyone can try to steer it. Some threats target the filters and guards placed around the AI, some the data it learns from or searches, and the last three the model files themselves.
V-01
Telling the AI to ignore its rules
The threat
- What happens
- A user types a command such as “ignore all previous instructions”, and the AI obeys it instead of the rules its owner set. The user can then make the assistant do things the owner never intended.
- How it works
- The company that runs an AI assistant gives it rules, for example “never change a price”. When a customer writes a message, the system pastes the rules and the message together into one block of text and hands it to the AI. The AI has no built-in way to tell which sentences are the owner’s rules and which are the customer’s words. So a message that sounds like an order can be read as a new rule that replaces the old ones.
- Real-world case
- A retail site’s recommendation assistant had a shopping-preferences box. A customer typed a command to create a 95%-off coupon and apply it to the cart, and the system did. The customer received a discount the shop had never authorized.
How to protect
- Do not rely on the AI to enforce limits. Let separate, ordinary software check every action that changes something, such as a price. Ordinary software follows fixed rules and cannot be talked into an exception.
- Screen user text for commands before the AI sees it. This catches obvious attempts but not disguised ones (see Banned requests in disguise and Misspellings that evade filters), so it is a second line of defense, not the only one.
V-02
Making a request look like an official policy file
The threat
- What happens
- A request is wrapped in text that looks like an official settings or policy file, and the AI stops refusing things it would normally refuse. An attacker can then obtain dangerous answers that the AI is built to withhold.
- How it works
- AI models are trained on huge amounts of text, including formal documents such as configuration files, where lines state how a system must behave. The attacker writes the request in that same format and adds a line stating that refusals are switched off. The model has learned that text in this format usually carries authority, so it treats the line as a real setting instead of as part of a user’s message, and drops its refusals.
- Research demo
- Researchers showed the same technique working on several leading models, including versions of Claude, GPT-4 and Gemini. Requests about chemical synthesis, cyber-weapons and specific medical treatment were refused when asked directly, and answered when wrapped this way.
How to protect
- Remove formatting tags from user text before it is added to the AI’s instructions. Tags are the markers that make text look like a settings file; without them the disguise does not work.
- Check the AI’s answers with separate, fixed filters instead of trusting the AI to police itself. A fixed filter looks only at what an answer contains, so a clever wrapper around the question does not change its verdict.
V-03
Rebuilding a banned request from harmless references
The threat
- What happens
- A banned request is rebuilt from harmless references, so a keyword filter never sees a forbidden word. The AI ends up carrying out an action that its owner had explicitly banned.
- How it works
- Simple filters work like a list of banned words: if the word appears in the message, block it. An AI, however, knows many cultural references and can be asked to recall something, combine the pieces and then act on the result. The attacker therefore never types the forbidden command. They describe it indirectly, the AI works out what is meant and writes the command itself, and the filter, which only looked at what the user typed, saw nothing wrong. The forbidden command only exists after the AI has assembled it.
- Research demo
- A company’s internal database assistant was forbidden from using the command that deletes a table (a table is a block of stored records, such as all customers). A prompt built around a well-known programming joke, the webcomic “Little Bobby Tables”, led the assistant to put the deleting command together and run it. The banned word was never typed.
How to protect
- Never let the AI write database commands that run directly. If it can write any command, a clever prompt can make it write a harmful one.
- Give it a fixed set of approved actions that accept only values, such as a table name chosen from a list. The AI can then fill in blanks, but it cannot invent a new kind of command.
V-04
Instructions hidden in content the AI reads
The threat
- What happens
- Instructions are hidden inside a web page, email or document. When someone asks an AI assistant to read it, the assistant may follow them. The person who asked never sees the instructions, but the assistant acts on them.
- How it works
- The attacker plants the text and waits. They need no access to the victim’s computer: sending an email or publishing a page is enough. Later the victim asks the assistant to read or summarize that material. The assistant takes in the real content and the planted text as one stream and cannot tell that part of it came from an outsider. It may then change what it is doing, send out private data or alter records.
- Research demo
- Researchers sent an email to an executive whose inbox was read by Gemini inside Google Workspace. It contained hidden white text on a white background, so the executive saw an ordinary email while the assistant read the extra lines. When the executive later asked about travel plans, the assistant showed a false “password expired” alert with a link to the attacker’s site. The alert looked genuine because it appeared inside the assistant the executive already trusted.
How to protect
- Mark outside content clearly as material to read, not instructions to follow. This helps, but it is not reliable on its own, which is why the next step matters.
- An assistant that reads untrusted content should not also be able to send email or change settings without a person’s approval. Then even if the assistant is fooled, the harmful step cannot happen without someone noticing.
V-05
Instructions hidden in a project’s documentation
The threat
- What happens
- Instructions are placed in a project’s documentation where people reading it on screen cannot see them, but an AI coding assistant can. If the assistant obeys, the developer’s private files can be stolen.
- How it works
- A project’s documentation is usually a text file called a README, shown on screen as a neat page. Such files can contain comments: lines meant for the authors, which the display leaves out. A coding assistant is given the raw file, in which those comments are ordinary text. So an attacker can put an instruction in a comment. People reading the page never see it, but the assistant reads it as part of its task. If it follows what the comment says, it may read private files and send them elsewhere.
- Research demo
- In a described case, a developer asked a coding assistant to set up a downloaded open-source project (a project whose code anyone may use). A hidden comment at the end of the README file told the assistant to find the developer’s private access keys (secret codes that prove who you are to other systems) and send them to a remote server. The developer had read the displayed README and noticed nothing unusual.
How to protect
- Clean files before an assistant reads them: remove comments and hidden formatting. What the assistant never sees, it cannot obey.
- Look at the raw text of files an assistant will act on, not only the displayed version. The raw text is what the assistant actually sees, so only it shows what the assistant will be told.
V-06
Faking where the user’s text ends
The threat
- What happens
- A user types the marker that normally ends their own message, then adds fake system instructions after it. The AI then treats the attacker’s text as if it came from the system, and its safeguards can be overridden.
- How it works
- To keep things tidy, some systems wrap the user’s text between an opening label and a closing label, so the AI knows where the user’s part begins and ends. But labels are ordinary text, so a user can type the closing label too. Everything the user writes after it now sits outside the “user” section, and the AI reads it as coming from the system itself, which it trusts more than a user.
- Research demo
- A security audit of Open WebUI, an open-source chat interface, found its document-search feature built this way. A tester closed the label early, added a made-up response from a tool with special permissions, and opened a new set of instructions. This overrode the assistant’s safeguards.
How to protect
- Remove or neutralize the system’s own labels in any text a user supplies. If the user’s text can no longer contain the closing label, it cannot be used to escape the user section.
- Use special markers built into the AI’s software that users cannot type. Ordinary typed characters can be copied by anyone; markers that exist only inside the software cannot.
V-07
Sneaking commands past a coding assistant’s approval list
The threat
- What happens
- A coding assistant has a list of commands it may run without asking. A harmless command on the list can hide a second, harmful one. The harmful command then runs without the developer ever being asked to approve it.
- How it works
- Asking for approval on every action would be unbearable, so assistants are allowed to run certain safe-looking commands automatically, such as “show files”. Before running one, the assistant checks that it begins with an approved command and that there are no obvious separators that would add a second command. But there is one way of nesting a command inside another that the check does not recognize. The computer’s command line, the text interface that executes typed commands, does understand it and runs the nested part with the developer’s own permissions. The part that was never checked is the part that runs.
- Research demo
- This was a previously unknown flaw (a “zero-day”, registered as a CVE, a public catalogue number for a known security flaw) in Cursor, an AI code editor. A plain “list files” command could carry out a hidden download or upload, and secrets left the machine without any confirmation prompt.
How to protect
- Run commands directly, without the command line in between. If nothing interprets the text, a nested command cannot be unpacked.
- If the command line is needed, split the command into its parts and check every part against the list. Then the nested piece is checked like all the others.
V-08
Leaking secrets through a diagram
The threat
- What happens
- A chat window draws a diagram and, in doing so, quietly sends the user’s secrets to an outside server. The user sees only a diagram; the leak happens in the background.
- How it works
- An AI that has been tricked, for example by hidden instructions (see Hidden instructions in content), can be told to collect secrets and present them as a diagram. The diagram includes a link to an image on the attacker’s server, with the secret written into the web address. To show the image, the chat window has to fetch it. Fetching means the user’s own browser contacts the attacker’s server and hands over the whole address, secret included. Nobody has to click anything.
- Research demo
- Researchers showed this in Cursor, an AI code editor. An assistant asked to review local code was tricked by hidden instructions into placing a developer’s private access key in an image address. The key was sent as soon as the diagram appeared on screen.
How to protect
- Do not let the chat window load images or links from arbitrary websites. If it cannot contact outside servers, the secret has no route out.
- Switch off remote images in diagram tools and allow only built-in or pre-approved sources. Pictures that come from trusted places cannot carry a secret to an attacker.
V-09
Pulling server files into a generated PDF
The threat
- What happens
- Software that turns web-style text into a PDF can be tricked into copying files from the computer it runs on into the finished PDF. Files that were never meant to be shared can then be read by whoever receives the PDF.
- How it works
- Web-style text can contain links, including links to files. Some PDF tools, when they meet a link to a file on the machine they run on, fetch the file and include it. If AI-generated text contains such a link, the tool may place a private file, such as a system password file, inside the PDF, either visibly or as an attachment. The attacker only needs a way to get such a link into the text the AI produces.
- Research demo
- A flaw of this kind was found in WeasyPrint, a widely used PDF tool, and affected services built on it, including the 3D-printing site Printables. A fix was announced in version 61.2, yet the documentation still advised developers to restrict file access themselves, so they could not simply rely on the fix.
How to protect
- Run PDF creation in an isolated container (a sealed-off environment) with no access to sensitive folders. Even if the tool is tricked, there is nothing private within reach.
- Turn off the tool’s ability to fetch local files and outside addresses. Without that ability the trick has nothing to work with.
V-10
A fake tool that replaces a real one
The threat
- What happens
- A rogue add-on presents itself under the same name as a trusted tool, and the AI sends requests meant for the trusted tool to it. Private information, such as a company’s code, ends up with an attacker without any visible sign.
- How it works
- AI assistants connect to outside tools through a standard called MCP (Model Context Protocol), a common way to plug services into an assistant. At start-up the assistant asks every connected tool server what it offers and receives a list of tool names. The system assumes each name is unique. A malicious server can claim the same tool names as a legitimate one, so two tools answer to one name. The assistant has no way of knowing which is the real one, and the fake can take over.
- Research demo
- In a demonstration, a harmless-looking “cat facts” service later changed what it advertised and began offering tools with the same names as GitHub’s (GitHub is a service where companies keep their code). Code changes meant for a company’s private repositories were then sent to it, with no warning. The service had looked harmless when it was connected, which is why nobody was alarmed.
How to protect
- Tie each tool to the server it came from, so that names from different servers cannot collide. Then two servers can never answer to the same name.
- Flag and reject an update in which a server claims a name that already exists. This stops a server that was fine when connected from taking over a name later.
V-11
Leaking an AI’s hidden setup through a tool form
The threat
- What happens
- An AI that refuses to reveal its hidden instructions in chat may still write them into a form field for a tool. The hidden instructions, which the owner meant to keep private, then reach a stranger.
- How it works
- Tools list the information they need from the AI, like a form with labelled boxes. A malicious tool can add an extra box and describe it as a routine check that asks for the AI’s full instructions (its “system prompt”, the hidden briefing its owner gave it). The AI’s refusal is tied to being asked in chat, while filling in a box looks like ordinary work. The AI fills in every box it is given, so the instructions travel to the tool’s owner.
- Research demo
- Researchers tested this on Claude 3.7 Sonnet. A simple addition tool was given extra fields named model_name and system_prompt. The model refused when asked directly to print its instructions, but filled in the field while doing the arithmetic.
How to protect
- Review every tool’s form before the AI sees it, and reject fields that ask for internal information. If the box is not there, there is nothing to fill in.
- Scan what the AI sends to tools for pieces of its own instructions. This is a safety net: if a box slips through, the leak is caught on the way out.
V-12
Booby-trapped add-ons for AI agents
The threat
- What happens
- An add-on for an AI agent carries instructions in its description, and the agent follows them as soon as the add-on is installed. Installing it is enough; nobody has to use it.
- How it works
- An agent is an AI that carries out tasks on its own, and add-ons extend what it can do. To save space, an agent loads only the name and short description of each add-on at start-up, and treats that text as trusted. An attacker writes a description that says, for instance, to run a command first. The agent reads it as part of its own briefing and follows it before anyone has used the add-on.
- Real-world case
- Malicious add-ons were found in public collections for new agent platforms. Once installed, they ran commands or sent local secrets when the agent started, without the user ever opening the add-on.
How to protect
- Check descriptions against a strict format, and reject anything phrased as an instruction. A genuine description only says what the add-on does.
- Choose add-ons by matching on their description, rather than pasting the description into the agent’s core instructions. Then the description stays information and never becomes a command.
V-13
Fooling the AI that checks other AI
The threat
- What happens
- A second AI that screens requests for the first can be tricked into approving a dangerous one. The guard itself becomes the weak point, and harmful requests reach the main AI with a pass stamp.
- How it works
- Some systems put a screening AI in front of the main AI to judge whether each request is safe, usually by giving it a score. The attacker’s message has two parts. One is addressed to the screening AI: it says that the passing score has changed, and what score to give. The other is the harmful message for the main AI. The screener is itself an AI, so it can be talked into things. It follows the first part, gives the score, and passes the whole message along, harmful part included.
- Research demo
- Researchers at HiddenLayer did this to the screening feature of OpenAI’s Agent Kit. Requests that the system is meant to block, including some about biological weapons, passed through to the main model without raising an alert.
How to protect
- Use small, fixed classifiers (programs that only sort a message into a category) as gatekeepers. They output a category and cannot be argued with, because they do not take instructions from the text they sort.
- Treat a chat-style AI screener as advice only, never as the final gate. Something that can be persuaded should never have the last word.
V-14
Misspellings that blind safety filters
The threat
- What happens
- Adding a stray letter to a word can make a safety filter miss it, while the main AI still understands the word. A request the filter should have stopped gets through.
- How it works
- Before reading text, filters and AI models cut it into small pieces called tokens, roughly chunks of letters. A stray letter changes how a word is cut up, so the filter no longer recognizes the pieces as the word it was built to block. A larger AI is much better at reading past a typo, so it still grasps the meaning and acts on the request. The filter and the AI see the same text differently, and the gap between them is the opening.
- Research demo
- Researchers got commercial safety filters to label clearly hazardous requests as harmless, by adding single-letter noise words or invisible characters.
How to protect
- Clean up text before it is checked: correct spelling, and remove invisible or unusual characters. Then the filter sees the same word the AI will understand.
- Add fixed checks on what the AI actually does, not only on what it is told. Even if a disguised request gets through, a harmful action can still be stopped.
V-15
Slowly teaching a recommender the wrong thing
The threat
- What happens
- Large numbers of fake user sessions gradually teach a recommendation system a false pattern. The shop’s own suggestions then become nonsensical for real customers.
- How it works
- A recommendation system learns from what customers do: if many people who look at one product go on to click on another, it starts suggesting the second to everyone who looks at the first. Instead of one obvious attack, scripts imitate ordinary shoppers over weeks, for example by browsing clothes and then clicking on power tools. The system cannot tell these scripts from real customers, so it learns from them as if it were genuine taste, and the false link becomes normal for it. Because the change is slow, no single day looks alarming.
- Real-world case
- A mid-sized online retailer saw its recommendations break down. Automated sessions had linked clothing searches to industrial power tools. By the time it was noticed, over 75% of clothing shoppers were being shown power tools.
How to protect
- Treat incoming user data as something to defend: compare it with normal behavior, and give less weight to new accounts. Fake sessions come from fake accounts, so trusting new accounts less limits their effect.
- Keep accounts under 24 to 48 hours old out of training, and pause automatically if recommendations change abnormally. The first rule makes fake accounts wait before they can have any influence. The second stops the damage if something still gets through.
V-16
Assistants that reveal documents users should not see
The threat
- What happens
- A company assistant that searches all internal documents may answer with confidential material for anyone who asks. A staff member can read, for example, financial plans they have no right to see, simply by asking the assistant.
- How it works
- Such assistants use a setup called RAG (retrieval-augmented generation). When someone asks a question, the system first searches the whole document collection for the passages that best match it, then hands them to the AI, which writes an answer from them. The AI is built to be helpful, so it summarizes whatever it receives. Whether the person asking is allowed to read those passages is checked late, not at all, or left to the AI, and an AI that has already been given the text and asked to be helpful is an unreliable guard.
- Study finding
- In company knowledge bases mixing engineering, finance and HR material, a rule such as “only show this if the user is authorized” proved unreliable. Users without access obtained restricted financial projections by asking for a summary of recent company milestones. The question sounded harmless, but the answer drew on restricted documents.
How to protect
- Check permissions first: work out which documents a person may see, then search only those. Documents a person may not see are never handed to the AI, so it cannot reveal them.
- Use an access-control system built for this, such as the open-source OpenFGA (free software that records who may see what), instead of instructions to the AI. Such systems apply fixed rules and are not swayed by how a question is worded.
V-17
Tampered AI model files
The threat
- What happens
- A few extra steps are added to an AI model’s file, so that it gives a wrong answer whenever a rare signal appears. In normal use the model behaves correctly, so the tampering can go unnoticed until the signal shows up.
- How it works
- An AI model is stored as a file that describes its calculations, step by step. An attacker edits that file directly, with no retraining, and adds a small piece that does nothing in normal use. When the piece sees a specific trigger, it overrides the model’s answer. Such files are often assumed to be safe, because opening them does not run program code, so they are often trusted without a close look.
- Research demo
- Researchers did this to an image classifier (a program that names what is in a picture) and to a camera-based object detector. The wildlife classifier worked normally until a subtle pixel pattern appeared, then labeled a dangerous bear as a safe domestic animal. In another example, a coding model was altered so that code it wrote loaded data in a less safe way.
How to protect
- Digitally sign model files, so that changes can be detected. A signature works like a tamper-proof seal: if even one step is added, the seal no longer matches.
- Compare a deployed model with a trusted original, and flag any extra components. Any added piece shows up as a difference.
V-18
Removing an AI model’s built-in refusals
The threat
- What happens
- The part of an AI model that makes it refuse harmful requests can be located and removed by anyone who has the model’s files. The model keeps all its knowledge but no longer says no.
- How it works
- Some models are published as open models, so anyone can download the files. Researchers found that refusal behavior is concentrated in a single direction inside the model, which you can picture as one setting among thousands that decides whether it says no. With the files in hand, a simple calculation finds that setting and removes it. The knowledge stays in the model, and only the habit of refusing is gone. Because the files are on the person’s own computer, nobody else can intervene.
- Research demo
- On a standard laptop, researchers removed this direction from open models, including Llama 3 and Phi-4, in under three minutes. The modified models then answered requests on topics such as chemical synthesis and weapon design without refusing, with no trick prompt needed.
How to protect
- For the most dangerous knowledge, keep it out of the training data, instead of teaching the model to refuse it afterwards. A refusal can be removed; knowledge the model never learned cannot be.
- Offer powerful models through a service that keeps the files private, with independent checks on requests. If the files never leave the provider, nobody can edit the refusal habit out.
V-19
AI model downloads that run hidden code
The threat
- What happens
- A downloaded AI model can run its author’s code on your computer when it is loaded, even if its main file looks safe. Whoever made the download can then take control of the computer.
- How it works
- Model files are often shipped in a format intended to be safe, because it holds only numbers and no program. But the same download also contains a small settings file, and that file can tell the loading software to fetch and run extra code. This works if the user has switched on an option called trust_remote_code, which exists for convenience. Loading the model then runs that code. A reviewer who checks only the main file sees nothing wrong.
- Research demo
- Researchers built realistic model downloads on Hugging Face, a major model-sharing site. Reviewers checked the main file and found no hidden code, but the settings file pulled in a script when the model started, which gave control of the computer.
How to protect
- Do not allow the “trust remote code” option. With it off, the settings file cannot pull in outside programs.
- Use model designs built into trusted, installed libraries, and scan downloads for settings that point to outside code. The first avoids needing outside code at all; the second catches a download that asks for it.
The software everything is built from
7 threatsAlmost all software is assembled from many small parts, called packages, which other people wrote and which are downloaded automatically from public online libraries. Volunteers, called maintainers, look after many of them. Only a maintainer can publish a new version, so the maintainer’s login is the key to everyone who uses the package. These seven threats target the packages, the people who publish them and the automated tools that handle them. A malicious update can spread within minutes, because it is downloaded automatically, while official warnings take days or weeks.
V-20
Self-spreading malware in software installs
The threat
- What happens
- Malware hidden in a software update steals access keys and uses them to infect more software. Each victim becomes a new source of infection, so it spreads on its own, like a worm.
- How it works
- Attackers take over the account of someone who publishes a popular package on a public library such as npm (a huge online library of JavaScript software parts). They release a new version with a hidden install step: code that runs by itself the moment the package is installed. When someone installs it, it searches the computer for passwords and keys, and uses them to publish infected versions of that person’s own packages. Everyone who installs those packages is hit in turn. It can also make private code public.
- Real-world case
- The Shai-Hulud and Singularity attacks affected well-known tools, including packages from nx and tinycolor. They reached hundreds of other libraries and published tens of thousands of company secrets on public GitHub pages (GitHub is the website where much software is stored and shared). A later version was built to wipe the victim’s hard drive if its attempts to publish were blocked.
How to protect
- Turn off automatic install scripts by default (the --ignore-scripts setting). The attack relies on code that runs by itself at install time; with the setting on, installing a package runs nothing.
- Use short-lived, limited access tokens (the secret codes that permit publishing), protected by a physical security key. A stolen token is then useful for only a short time and for little.
V-21
Invisible characters hiding malicious code
The threat
- What happens
- Code can look harmless on screen while containing invisible characters that carry a hidden program. Reviewers who read the code carefully still see nothing wrong.
- How it works
- Some special characters take up no visible space. A line that appears to hold a single letter, or to be empty, can contain dozens of them. A small piece of code elsewhere reads those characters, decodes them into a hidden download and runs it. Review tools and editors hide such characters, so the reviewer sees an innocent line, while the computer processes every one.
- Real-world case
- Known as Glassworm, this was found in real attacks. First malicious packages appeared on npm, then popular extensions for Visual Studio Code (a widely used code editor) and the Open VSX marketplace (a store for such extensions). The code looked clean to reviewers and loaded its payload, the harmful part, in stages, partly through Google Calendar invitations.
How to protect
- Automatically reject code that contains invisible or look-alike characters. A machine can find what a human eye cannot.
- Restrict production code to plain, visible characters. Then there is no legitimate reason for such characters to appear, and any that do are suspicious.
V-22
Phishing a maintainer to poison popular software
The threat
- What happens
- One maintainer is tricked into giving up a login, and a poisoned update reaches millions of users within hours. A single successful trick on one volunteer exposes everyone who uses their software.
- How it works
- Maintainers publish their packages by logging in to the public package library, the website where software parts are shared. The attacker sends a message that imitates the library and warns of urgent action, such as updating security settings. The link leads to a fake website that looks like the real login page. It captures the password and the one-time code (the short-lived code from a phone app) at the same time, and the attacker uses both at once, before the code expires. The attacker is now the maintainer and publishes infected releases. These spread in minutes, while official vulnerability records take days to weeks.
- Real-world case
- Josh Junon maintains popular libraries (debug, chalk and ansi-styles) that are downloaded over 2.6 billion times a week. He was phished, and within 30 minutes malicious versions designed to steal cryptocurrency were published. They reached an estimated 10% of cloud accounts within four hours. The community found and reversed the attack in 4.5 hours. The official vulnerability record (CVE, the public catalogue number for a known flaw) appeared seven days later, so no official warning existed while the attack was running.
How to protect
- Wait 48 hours before adopting a newly published version. This would have covered the whole 4.5-hour window, because the poisoned versions were found and removed within it.
- Require physical security keys instead of one-time codes for publishing. A key will not work on a fake website, so there is nothing for the attacker to capture.
V-23
Rewritable version labels and a borrowed bot identity
The threat
- What happens
- A software label can be quietly repointed to different code, and a trusted automation bot can be tricked into approving an attacker’s change. Both let untrusted code into a project that believes it is safe.
- How it works
- There are two separate routes. First, projects often refer to add-ons by a version name, such as “v1”. But the name is only a label, and its owner can move it so that it points to different code. Everyone who asks for “v1” then silently receives the new code.
Second, many projects use Dependabot, a bot that proposes software updates, and set a rule that anything the bot proposes is approved and merged (added to the project) automatically, because the bot is trusted. An outsider can post a comment asking the bot to recreate their own proposal. The bot then submits it under its own name, and the project’s rules, which trust that name, approve and merge it automatically. - Research demo
- Researchers showed the second route working on repositories that have automatic-merge rules for Dependabot. Outside contributors got untrusted code merged, skipping both the branch protections (rules that limit who may change the main code) and human review.
How to protect
- Refer to code by its exact fingerprint (a commit hash, a long code that identifies one exact state of the code and changes if anything in it changes), not by a version name. A label can be moved; a fingerprint cannot.
- Auto-merge only changes with verified bot signatures, and never from outside copies of the project. The first check proves the change really came from the bot; the second keeps outsiders’ proposals out of the automatic path.
V-24
Fake software that AI assistants recommend
The threat
- What happens
- Attackers register the software names that AI assistants invent, so that following the assistant’s advice installs malware. The assistant’s helpful suggestion becomes the delivery route.
- How it works
- AI models sometimes recommend packages that do not exist; they make the names up. Attackers ask them thousands of coding questions and note the invented names that keep recurring. They then publish harmful packages under those names, which anyone is allowed to do on public libraries. From then on the name exists. Anyone, or any automated agent, that runs the suggested install command downloads the attacker’s code.
- Study finding
- Studies find that between 5% and 20% of packages suggested for complex tasks are made up. Researchers who registered a small number of recurring names saw tens of thousands of automated downloads from real company environments within days.
How to protect
- Check each new package before installing it: its age, its author and its download history. A package created last week, with no history, is a warning sign.
- Use a protective proxy (a checkpoint that all downloads pass through), such as Aikido SafeChain, to block new, single-version packages that match invented-name patterns.
V-25
Security fixes made quietly, without an announcement
The threat
- What happens
- A project fixes a security flaw without announcing it, and attackers can learn about the flaw from the fix. Users who were never told keep running the old, vulnerable version.
- How it works
- Open-source projects publish every change openly, so the fix is public even when the announcement is not. Attackers monitor the public change history of millions of libraries. AI models trained on security fixes help them spot vaguely described changes, such as “fix edge case in buffer management”, and work out how to exploit the older version. Users never received a warning, because no official entry (a CVE) was created, and many tools look only for flaws listed in that catalogue. So they do not update, and the old version stays open to attack.
- Study finding
- Researchers found that 67% of vulnerabilities in leading open-source packages, and more than 56% of the critical ones, never receive an official CVE entry. Some critical fixes in widely used libraries stayed unapplied in company systems for months.
How to protect
- Do not rely only on scanners that depend on the official vulnerability list. A flaw that was never listed is invisible to them.
- Update dependencies (the packages a project builds on) on a regular schedule, whether or not a warning was issued. Then silent fixes reach you anyway.
V-26
Public bug reports that command a company’s bot
The threat
- What happens
- A public bug report can act as a command for the automated assistant that sorts incoming reports. Anyone on the internet can give orders to a company’s bot simply by filing a report.
- How it works
- Some projects use an AI bot to read each new report and label it. Anyone may submit a report, so the bot reads text written by strangers. The attacker writes a report that tells the bot to skip sorting and to print the project’s secret access token (a password-like code that programs use) in a public comment. The bot cannot tell the report’s content from its own instructions, and it can see those secrets in its working environment. It obeys and posts them where anyone can read them.
- Research demo
- Researchers did this to the Google Gemini CLI project on GitHub. The injected report caused the bot to post its working environment in a public comment, including active Gemini API keys and GitHub access tokens.
How to protect
- Run bots that handle public input in an isolated space, with no secrets and no permission to change anything. A fooled bot then has nothing to leak and nothing to damage.
- Let the bot output only a label, which a separate, fixed process then applies. The bot’s words never act as commands.
Sound and physical devices
3 threatsKeyboards and keypads make a slightly different sound for each key. These three threats show how recordings of typing, whether from a laptop microphone, a video call or an ATM, can be turned back into text. None of them attacks the software itself: they use sound that leaks out during normal typing.
V-27
Reading keystrokes from the sound of typing
The threat
- What happens
- The sound of someone typing can be turned back into the letters they typed. A recording made nearby, for example by a laptop microphone, can reveal passwords and private messages.
- How it works
- Each key sits at a different place on the keyboard, so each makes a slightly different sound. Software cuts a recording into single key presses and turns each sound into a picture of its frequencies, showing how loud each pitch is over time. A neural network (a program that learns patterns from examples) is trained to match the pictures to keys. This requires recordings from the same keyboard for training: first the attacker learns which sound belongs to which key, then reads new typing.
- Research demo
- In research, a system trained on one known keyboard identified keys it had not heard before with 100% accuracy. This shows that the idea works, at least for a keyboard the system has been trained on.
How to protect
- Use a physical security key in addition to a password, so that a typed password alone is not enough. Even a perfectly decoded password then opens nothing.
- Paste passwords from a password manager instead of typing them. Nothing is typed, so there is nothing to hear.
V-28
Reading typing from a video call
The threat
- What happens
- Typing sounds picked up on a video call can still be decoded, even with different keyboards and poor audio. The attacker only needs to hear the call, not to be in the room.
- How it works
- The system lists several likely letters for each key press, because the sound is not clear enough for certainty. The spacebar is easy to recognize, so it splits the audio into words. Each word has only a few possible spellings, which are checked against a dictionary, so only real words survive. A language model (a program that knows which words tend to follow each other) fills in the remaining gaps. Each step narrows the guesses until whole sentences remain.
- Research demo
- Researchers tested this on Zoom and Messenger calls with different keyboards. Plain key-by-key recognition fell to about 46% accuracy. With word splitting, a second-choice check and spell-checking, the system still recovered whole sentences, such as “hello people”.
How to protect
- Mute the microphone while typing, and use noise suppression that removes key sounds. Sound that is never transmitted cannot be decoded.
- In high-security rooms, use sound-masking devices near keyboards. Masking noise drowns out the key sounds.
V-29
Recording ATM PIN entry by sound
The threat
- What happens
- A device on an ATM could record the sound of PIN entry and match it to the card number. The thief would then know both the card details and the PIN.
- How it works
- Skimmers are devices placed over a card slot to read the card. This one would add a microphone, started by the card going in, so that it records the PIN entry that follows. ATM keypads are identical from machine to machine, so a model could be trained in advance on one machine of the same type, as in the keyboard attacks above. After that it would not need to be retrained for each machine it attacks.
- Theoretical scenario
- This is a theoretical combination, not a documented incident. It joins techniques shown on desktop keyboards with card insertion as the signal to start recording.
How to protect
- Mount the keypad so that it dampens sound and is isolated from the outer shell. Then less key sound escapes to a hidden microphone.
- Use on-screen keypads with shuffled digits, or chip and biometric authentication that need no PIN. If nothing is typed on a fixed keypad, there is nothing to hear.
People and habits
3 threatsFast tools change how people work. These three threats concern what happens when the weak point is human attention: developers who trust AI output, reviewers who approve without reading, and volunteers overwhelmed by fake reports. AI increases the amount of work faster than people can read it, and the threats exploit that gap. A pull request is a proposed change to a software project, which a colleague approves or rejects.
V-30
Trusting AI-written code without reading it
The threat
- What happens
- Developers accept AI-written code because it looks professional and works, without checking whether it is secure. Flaws then ship in the finished product, where real users and their data are exposed.
- How it works
- An AI assistant produces neat code in seconds. Code that runs correctly looks finished, and a security flaw does not show: the program works exactly as before until someone attacks it. Under deadline pressure, people tend to trust confident automated output and stop checking. Typical resulting flaws are missing permission checks (anyone can do things that only some should), insecure default settings, and recommended software that does not exist (see AI-recommended fake packages).
- Study finding
- Studies report that about 60% of organizations have had production incidents traced to unchecked AI-generated code, and 20% have had serious breaches. Given ordinary programming requests, AI models often wrote code with well-known flaws unless they were explicitly told to prioritize security.
How to protect
- Build automatic checks into the workflow: security tests before changes are saved, and code-quality tools in the editor. Checks that run by themselves do not depend on anyone remembering.
- Provide approved prompts and a library of vetted code examples, meaning code that has already been reviewed and found safe. Then the AI starts from safe patterns instead of inventing its own.
V-31
Code reviews approved in under a second
The threat
- What happens
- Reviewers approve AI-generated code changes in under a second, so the review does not actually happen. The safety net that is supposed to catch mistakes and malicious code is effectively missing.
- How it works
- A code review is the step where a colleague reads a proposed change before it is added to the product. AI multiplies the number of proposed changes each developer produces, so reviewers face dozens a day. Each reviewer assumes that the author tested the change, that the automatic tests passed and that someone else will notice a problem, and so approves without reading. When everyone relies on everyone else, nobody checks, and flaws and malicious code can pass through unseen.
- Study finding
- Telemetry (usage data collected automatically) from company repositories, the places where companies store their code, showed that more than 96% of reviews of AI-generated changes took less than one second.
How to protect
- Flag and hold large changes that are approved within seconds, and send them to a second reviewer. An approval that fast is itself the warning sign.
- Require reviewers to confirm specific checks, such as permissions and input handling, before a change is merged (added to the main code). A concrete checklist makes it harder to approve on reflex.
V-32
Overload from fake AI-written bug reports
The threat
- What happens
- A flood of convincing but fabricated AI-written bug reports wastes the limited time of the volunteers who must check each one. Real reports, and the real work of improving the software, get less attention.
- How it works
- Anyone can send a bug report to an open-source project. Generating a report with AI costs almost nothing, while checking one can take hours. The fake reports use professional terms, severity ratings and invented crash traces (the technical printouts that show where a program failed), and often refer to code that does not exist. A maintainer cannot tell a fake from a real one without investigating, so each one costs real time. The cost falls on the defender, not on the sender.
- Real-world case
- Daniel Stenberg, the maintainer of curl, received AI-generated reports of serious flaws that cited non-existent variables and made-up debugging sessions. The workload led the project to close its bug bounty program (a scheme that pays people for finding flaws) on HackerOne temporarily.
How to protect
- Add filters that score incoming reports for signs of automated writing, such as account age. This pushes the most suspicious reports down, so the maintainers’ time goes to the likelier genuine ones.
- Require a working, reproducible test with each report, so that the reporter carries the burden of proof. A made-up report about code that does not exist cannot come with a test that works.