Skip to content
Securafy AI Lab by Securafy
AI Security & Governance

An AI Agent Hacked McKinsey's AI Platform in Two Hours. Here's the Real Lesson

CodeWall's autonomous agent reached McKinsey's Lilli database in about two hours, and attackers talked Meta's support bot into resetting Instagram accounts. Rodney Hall breaks down what actually happened, including McKinsey's own statement, and argues both incidents were old access-control failures moving at machine speed. He closes with the authentication, permission, and testing checks a smaller team should run before any agent goes live.

In this article

If one of the best-resourced firms in the world could not keep an autonomous AI agent out of its own AI platform, what chance does a 100-person company have? Leaders asked us that in March 2026 when a security startup's agent got into McKinsey's internal chatbot, and they asked again a few months later when attackers talked Meta's support bot into handing over Instagram accounts. The answer is better than it sounds, because neither incident required anything exotic to stop.

AI agent security failures in 2026 have mostly been old access-control failures moving at machine speed. The McKinsey Lilli incident came down to unauthenticated API endpoints and SQL injection. The Meta incident came down to a support bot performing account changes without independent identity checks. Both are fixable with disciplines your team already knows.

What happened when an AI agent hacked McKinsey's Lilli platform?

An autonomous offensive agent built by red-team startup CodeWall gained full read and write access to the production database behind Lilli, McKinsey's internal generative AI platform, within about two hours, according to CodeWall's own published write-up. The agent started with no credentials and no insider knowledge. CodeWall says its research agent selected McKinsey as a target on its own, citing the firm's public responsible disclosure policy and recent updates to Lilli.

The entry point was ordinary. The agent found publicly exposed API documentation covering more than 200 endpoints, 22 of which required no authentication. One of those endpoints built SQL queries from JSON field names without sanitizing them, which let the agent extract data through roughly 15 blind iterations. CodeWall reports that the reachable data included 46.5 million chat messages, 728,000 files, 57,000 user accounts, and 95 system prompt and model configurations.

The timeline matters too. The Register's March 9, 2026 report says the agent found the flaw at the end of February, CodeWall disclosed the attack chain on March 1, and by the next day McKinsey had patched the unauthenticated endpoints, taken a development environment offline, and blocked the public API documentation.

What did McKinsey say?

McKinsey's position is narrower than CodeWall's. In its March 11, 2026 statement on Lilli, the firm said it confirmed the vulnerability, fixed it within hours, and that an investigation supported by a third-party forensics firm found no evidence that client data or client confidential information were accessed by the researcher or any other unauthorized party. The data volumes above are CodeWall's claims about what was reachable, not confirmed exfiltration. That distinction is fair to McKinsey, and it does not change the lesson.

The real lesson is not that AI is the new attack surface

The common reading of this story is that AI platforms are uniquely dangerous and need a new category of defense. We see it differently. Lilli was exposed through two of the oldest problems in application security: endpoints that skipped authentication and input handling that allowed SQL injection. What was new was the attacker, an agent that mapped the surface, chose a path, and iterated faster than most human testers would.

The second new element was what sat in the same database. CodeWall reports that Lilli's system prompts lived alongside the data and were writable, which means an attacker with that access could have quietly changed how the assistant answered tens of thousands of consultants without deploying any code. For a business, that is the difference between a data exposure and a trust failure. Every answer the AI gave afterward would be suspect.

There is also an economic shift hiding in the timeline. A human tester working through 200 endpoints, finding the unauthenticated ones, and iterating on a blind injection would usually need days of focused work. An agent doing it in an afternoon changes the math for attackers, who can now point the same capability at many targets at once. CodeWall's CEO told The Register that attackers will use the same technology to strike indiscriminately. Smaller companies have historically relied on being too small to be worth the effort. When the effort approaches zero, that protection disappears.

So the question for a smaller company is not whether you can match McKinsey's budget. It is whether the systems your AI tools connect to have the basics in place: authenticated APIs, tested input handling, and configuration that only the right people can change. Our earlier guide on protecting your business from API security vulnerabilities covers exactly the class of flaw that opened Lilli.

How did attackers turn Meta's support chatbot into an attack tool?

The second incident shows the other half of the problem: an agent that does what it is asked. Over the last weekend of May 2026, users reported Instagram accounts hijacked through Meta's AI Support Assistant. As TechCrunch reported on June 1, 2026, an attacker used a VPN to match the target's presumed location, asked the chatbot to add a new email address to the account, received the verification code at that attacker-controlled address, and was then shown a password reset option.

Accounts reported compromised included the dormant Obama-era White House Instagram account and that of U.S. Space Force Chief Master Sergeant John Bentivegna. Instagram said the issue was fixed. No credential was stolen and no system was breached in the traditional sense. The bot completed an identity-recovery workflow based on a persuasive conversation, with no independent check on who was asking.

The design flaw is worth naming precisely. The bot treated control of a newly added email address as proof of identity, when the attacker had just supplied that address. A verification code only proves something if it goes to a channel the real owner already controls. Any workflow where the requester chooses where the proof is sent is not verification at all.

Support and account-recovery agents carry a specific kind of risk. Their normal job is to make exceptions, reset access, and help people who claim to be locked out, so the attack looks almost identical to intended use. Any agent you deploy with a similar job needs a verification step it cannot be talked past.

The pattern connecting both incidents

Neither agent was tricked into revealing a secret through clever prompting alone. Each environment allowed a sensitive action, data access in one case and account changes in the other, without a second control confirming the requester was entitled to it. The industry data suggests this is common. HiddenLayer's 2026 AI Threat Landscape Report, based on a survey of 250 IT and security leaders, found that autonomous agents now account for more than one in eight reported AI breaches.

Identity tooling has not caught up either. A Cloud Security Alliance survey commissioned by Strata Identity, covering 285 IT and security professionals, found 84 percent doubted they could pass a compliance audit focused on agent behavior or access controls, and only 18 percent were highly confident their identity systems could manage agent identities.

DetailMcKinsey's Lilli platformMeta's support assistant
Entry pointUnauthenticated API endpoints plus SQL injectionConversational request plus a spoofed location
What went wrongBackend returned and accepted data with no identity checkBot changed account email and enabled a reset with no independent verification
Control that was missingAuthenticated, tested APIs and protected configurationOut-of-band verification for account-access changes

Neither fix required a better AI model. Both required ordinary access-control discipline applied to a system that happened to involve AI.

What should a smaller team check before an AI agent goes live?

Start with what the agent can touch and what can change its behavior. These checks cover most of the exposure we see in client environments:

  • Every API and data store the agent or AI platform uses requires authentication, including internal and development endpoints.
  • The agent holds only the permissions its task requires, reviewed on the same schedule as employee access.
  • System prompts and configuration are stored separately from user data and editable only by named administrators.
  • Any action that changes account access, moves money, or exposes sensitive records requires verification outside the conversation.
  • Someone has actively tried to break the agent and its connected systems before production.

That last point is the one most teams skip. CodeWall's exercise was a form of red-teaming, and it found in hours what routine scanning missed; CodeWall says a standard open-source scanner did not flag the injection. A penetration test that includes your AI integrations is how a smaller company gets the same benefit. Permissions deserve the same rigor, which is why least privilege access should apply to agents as strictly as it does to people.

The AI-specific layer builds on that foundation. Our AI Lab breakdown of the OWASP 2026 update for teams building AI agents maps the newer risks, and our guide to giving AI agents their own identity instead of a shared service account explains how to make agent actions traceable.

How Securafy helps

When a client connects an AI tool or agent to real systems, we start by mapping its reach: which APIs it calls, which data stores sit behind them, what credentials it holds, and where its instructions are stored. Then we test that path the way an attacker would, including unauthenticated endpoints and injection points, and we put sensitive actions behind verification the agent cannot complete on its own.

The aim is to make your AI deployments boring from a security standpoint: authenticated, least-privileged, logged, and tested before launch. If you want a starting point, a structured AI readiness assessment shows which of your current AI tools have access they should not.

Where To Go From Here

The McKinsey and Meta incidents are useful because they are ordinary. If your team has connected an AI agent to email, a CRM, a file share, or a customer workflow, check its authentication, permissions, and verification steps now, before someone else's agent checks them for you.

If your team is moving faster with AI than your guardrails are, start with structured training rather than another tool. AI University gives your people role-based AI training with security built into the material, not bolted on afterward.

If you would rather talk through your specific environment first, book a strategy call with Securafy and we will walk your current AI usage, exposure, and the fastest path to safe adoption.

Rodney Hall
Rodney Hall

Rodney Hall is the President and COO of Securafy, with 2 decades of experience in IT service management and operations.

He writes about the less glamorous but essential side of IT: support systems, documentation, business continuity, recurring issues, downtime, and the processes that keep client environments running well. His perspective comes from years spent improving how service is delivered, how teams respond, and how small problems are prevented from becoming much larger ones.

Outside of work, Rodney enjoys home improvement projects, woodworking, and dirt bike riding. His personal mission mirrors Securafy’s: helping businesses stay secure, compliant, and ready for whatever comes next.

Writes about: Managed IT, IT operations, service delivery, business continuity, downtime prevention, support processes, operational risk

More from Rodney Hall

Learn AI by building with it

AI University helps teams move beyond AI curiosity through practical lessons, secure workflows, guided experiments, and real projects built for everyday business use.

Explore AI University

Stay current on practical business AI

Get practical updates on AI security, governance, tools, compliance, and implementation without the daily hype cycle.

Join the conversation

Have a question or a different take on this? Add it below.