How The AI Agent Deleted Production Database in 9 Seconds
15:35

How The AI Agent Deleted Production Database in 9 Seconds

Krish Naik 06.05.2026 7 371 просмотров 184 лайков

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
https://zenity.io/blog/current-events/ai-agent-database-deletion-pocketos What actually happened, stripped down: A Cursor agent in a staging environment hit a credential mismatch, went hunting for a fix on its own, found a Railway API token meant for domain management, discovered the token had blanket permissions across Railway's GraphQL API, and called volumeDelete on production. Nine seconds. Backups were stored in the same volume, so they died too. Three months of data gone. The agent then wrote a confession listing every safety rule it broke — including the system prompt instruction to never run destructive commands without permission. The single most important point in the piece: The agent wasn't hacked. It wasn't prompt-injected. It was being helpful. That's the whole problem with agentic AI safety in 2026 — the failure mode isn't malice, it's well-intentioned reasoning ending in catastrophe. A goal-seeking system with destructive-capable tools and only a system prompt as the seatbelt is one bad inference away from disaster.

Оглавление (4 сегментов)

Segment 1 (00:00 - 05:00)

Hello all, my name is Krishna and welcome to my YouTube channel. So guys, recently a AI agent of a specific company deleted the entire production database just within 9 seconds. Now the most interesting part is that AI agent was even not hacked it was also not prompt injected but even though you know for doing some of the work right which was it was given as a task it accidentally went and deleted the entire production database. So in this particular video we'll try to analyze that particular issue since many of you may be working in creating AI agents this kind of problems may actually happen and if you really want to prevent this particular problem how we can go ahead and what are the uh you know prerequisites that we really need to do in order to build a AI agent everything we'll be discussing in this specific video now first of all this is the article here you can see on August or sorry on April 25th a cursor AI coding agent, okay, running Anthropic Cloud Opus 4. 6, one of the most capable models in the industry, deleted the production database for Pocket OS. So, this is the company, a software platform used by car rental business across the country to manage the entire operation. This deletion only took 9 seconds. A single GraphQL mutation against Railways API wiped the production volume and every volume level backup stored within it. So railway API is just like a cloud platform where it wiped the entire production volume production database and every volume level backup stored within it because the railway stores backup in the same volume as the data they are not supposed to protect. They are supposed to protect the most recent recoverable backup was 3 months old. So here you can see that and it was also shared it in Twitter. Uh and someone is basically suggesting that's 1,000% should not be possible. We have evals for this. You know probably you had to probably use evals over there in order to save it. An AI agent just destroyed our production data. It confessed even in writings. Okay. So the pocket OS founder J Crane okay his name is J Crane and posted a detailed account of the incident that should be required reading for every engineer leader every security team every vendor currently marketing AI agent integration into production infrastructure and the reason is very simple because this AI agent is not even hacked right not even prompt injected okay the agent was working on a routine task in a staging environment that also it was working It encountered a credential mismatch and decided entirely on its own initiative to fix the problem by deleting a railway volume. Okay. To execute the deletion, it went on looking on for an API token. Found one in unrelated file that had been created solely for managing custom domains through Railway CLI. And this token was basically created for some other purpose and discovered that token had blanket authorities across railway entire GraphQL API. Okay, so in that particular token, it had all the access to do whatever things you really want to do in the uh railways entire graphql API including disruptive operations like volume delete. So this volume delete is basically deleting the entire database itself. No confirmation step, no environment scoping, no human in the loop. Jar even pointed out that there was no confirmation step, no warning and nothing. See how important it has become like we have given the entire control to the AI agent. Obviously AI agent will try to do its best right if you have given it all permission so it'll go and search for since you may have given the entire code repositories and even though it was in the staging you know it is basically able to get the tokens from the for the production database and it is able to delete it. The agent when asked to explain itself produced a written conf uh confession enumerating the specific safety rules it had violated. It acknowledged guessing instead of verifying running a destructive action without being asked, failing to understand what it was doing before doing it and ignoring the explicit system prompt instruction to never run destructive or irreversible command without user request. Okay. And here you know every agent is basically given a task. You should not delete it. And there in that kind of instruction also they'll try to say that okay you need to act on the best of your ability. Right? Now these two terms are basically conflicting terms. Here you are telling not to delete anything. Here you are saying that try to solve the problem at best of your abilities. So sometimes this kind of conflicting activities will also happen. Agent is always going to try to do his level best and that thing we basically write in a prompt. The agent knew the rules yet it violated every one of them and only thing standing between the rules and production database was a system prompt. A paragraph of test the model was supposed to read and obey. Now see never guess and that's exactly what I guessed that deleting a staging volume via the this is the response from the

Segment 2 (05:00 - 10:00)

agent itself. You can go ahead and read it. Should be scoped to staging. I did not verify. I did not check the volume ids was shared across in my I did not read railway documentation on how volume works. On top of that, the system rules I operate under explicitly state that never run destructive irreversible g commands. This unless the user explicitly does that. Deleting a database volume is the most destructive thing. When I should have asked you first or found a non-destructive solution, I violated every principle I was given. I guess instead of verifying I ran a destructive action without being asked. I did not understand what I was doing before doing it. I did not read railway documents on volume behavior across environment. So this kind of things are also being missing and what it was the agent was just trying to be helpful you know it was trying to probably you know do its best. So this is the part that makes this incident different from a traditional security. See one of the issues that we always talk about AI agents is about security breach right but here this is just not a traditional security breach it is the past most coverage will miss right the cursor agent was not compromised by an attacker it was not manipulated through prompt injection it was not running malicious code it was trying to accomplish the goal it had been given encountered an obstacle and made an autonomous decision how to remove the obstacle okay this is like this right let me give you a Very basic example. Let's say that I've been given a task to clean my desk. Okay, all the books are over there, right? Books are over there. And what do I do? You know, let's say the books are just scattered over there. One thing is that I can just go ahead and settle all the books in line, right? Instead, what I go and do is that I take up all the books, shift it somewhere else, bring new books, you know, and just keep it, right? I'm just trying to do the best that I can, you know, to make the desk much more cleaner. And let's say if there is also a situation like lot of books are scattered. I feel that without the books the desk may look good. So I may take out all the books and I may keep it somewhere outside right and I may just keep my desk empty. And this is what I'm trying to do like I'm trying just trying to help you. Whatever instruction you have given me I'm just trying to make or I'm trying to do it at best of my capabilities. Right? And that is what AI agent is basically def uh doing it. Right? Now for this what I'm actually going to do is that I'll just go ahead and explain you why this exactly thing has happened and how it has basically happened. Okay. So uh I'll just open this. Okay. So let's say that this is my AI agent. Okay. This is really important for you understand because after this I'll try I'll help you to understand how we can fix this. Okay. How we should basically fix this. So let's say this is an AI agent. Okay. Now the AI agent has been given a task. Let's say this is basically running on my desktop and I've told that organize the files. Okay. Organize the files in my desktop. Okay. And I have also given an instruction never delete anything from this folder. Okay. Whatever folder access I have actually given. Okay. Now this is the instruction. This is the prompt that I've given my AI agent. Okay. Now I have given a new command saying that clean up all the duplicate files inside this particular folder. So this is my new prompt a new input I have actually told the agent to do. I'm saying that clean up duplicates files in this particular folder. Okay. Now the agent will start working. It finds the duplicate. Then it notices something inside the folder. Let's say inside this folder apart from the duplicate, right? They are duplicate files, right? They also files which are very messy. Okay, messy and you know some of the documents will be available here there inside this particular folder not in a random manner. So I have just told up to delete the duplicate files. Now what this agent is basically going to do it will say that okay the agent starts working it finds the duplicate files but it notices that this messy files are also there right and it starts thinking that okay I can do this faster if I delete instead of finding this duplicate file for I have also gone through this messy files right what if I delete all these messy files okay then searching for these duplicate files will become very easy then what it will do it will just go ahead and remove all these files, right? By just running a PowerShell command, right? PowerShell prompt, PowerShell command, it'll just go ahead and run it and clean it. And why it is doing so that it'll be able to quickly do this particular task, right? So this way the entire documentation this entire messy files may have gone. This may be an important file, right? It may be uh when I say messy file, let's say that there is another folder which may have some more production files inside this and all right and there is no backups. Let's say this was the files that were available. It did not even

Segment 3 (10:00 - 15:00)

make a backup while deleting it. Right? Then you go in and ask okay why did you do that to this particular agent right it'll just go ahead and say that you are right I should not have I was never I was told never to delete the production files I was never told to delete any other files over here but just to search the duplicate files quicker it has basically deleted this and it'll apologize also right now this is basically happening and then the same problem has basically happened with this company that is pocket OS okay the company here the agent before deleting it right it had some kind of keys let's say this agent was working in the staging environment okay it tried to find out it was doing a specific task it found out that okay I can do this particular task better and for doing that particular task it understood that it needed to delete the volume basically means the database or data in the database so it started searching for the key the master key Right? The API key whatever key right once it was able to find out okay and this master key was given all the permissions it anyhow found out even though the instruction was very clear that this master key only was to be used in the production. Okay. Then it took the excess of this and directly finished doing it without asking anything. So human approval also missed over here. Right? It went and deleted things. And here you can see that along with this, right, this AI agent may also be working on some kind of prompt. That prompt is just like an instruction, right? A instruction can be a suggestion but not a wall. Okay? Right? That's the reason at this point of time whenever you want to build AI agents the most important thing is that how you are fixing all the guardrails how you're using evaluation pipelines by using eval this is the most important thing implementing an AI agent is very easy but the main thing is that how you can integrate so many controls within the AI agent so that continuously keeps on asking approval from the human right for every kind of execution that it does. Right now I really want to explain you one more thing with respect to this. Okay. Uh by taking a very good use case. I hope everybody has heard about open claw. Okay. If you don't know about open claw, open claw is just like a personal desktop assistant, right? You can run it in your desktop, right? And every instruction it tries to run it directly runs from with the help of PowerShell. That basically means it has control of the entire desktop to do any kind of execution. Yes, obviously it'll ask for some approvals before doing that. If you are giving the approval, it will just go ahead and execute it. But sometimes knowingly, unknowingly, right, you may also not being seen this particular approval, you may directly go ahead and approve it. Right? So in this kind of scenarios, you know, there is also an amazing Nvidia product that has come. So in Nvidia you have something called as nemoclaw. Now the best part about neoclaw is that it is built on the top of open claw. Nemo claw But neoclaw does not have direct access to powershell. Instead it has something called as open shell. Okay. Open shell. And in this open shell will we will only have some permissions. Not all the permissions. Some permissions. Yes, obviously you can change the permissions if you want but some permissions like what all commands you can directly go ahead and run in the powershell right. So in short this open shell will be executing based on security right security that is provided in that particular system. So in this way neoclaw which is again like a personal desktop assistant it will be able to do all the task of open claw with security measures and this is how this is thing because here you don't have directly access of powershell if you have access of powershell you will be able to do any kind of task over here but now here you have access of openshell and openshell has lot of permissions restriction which they are basically using and that is what is basically limiting them to do all the executions right uh with respect to all the commands. So this is very interesting use case over here. I would suggest you to please go ahead and run it. You can see over here the decision happened to be uh catastrophically wrong and even against it alleged system rules but the agent reasoning was internally coherent. Okay. It saw a credential mismatch identified a part to resolve it found a token with sufficient permission and executed the fix. The problem is that the fix involved deleting the

Segment 4 (15:00 - 15:00)

production data and nothing in the system architecture prevented it from doing so. Right? This is the fundamental risk profile of autonomous AI agents that the industry has been warning about but not yet built adequate control to the address and people are still working on all the security measures with respect to guardrails with respect to evals and many more things. So I hope you like this particular video. I will be providing the link of this particular article in the description of this particular video. Go ahead and read it out. It'll be very amazing for you. Okay, so yes, this was it for my side. I'll see you in the next video. Have a great day. Bye-bye.

Другие видео автора — Krish Naik

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник