On March 9, 2026, CodeWall.ai disclosed how an autonomous offensive agent breached McKinsey's Lilli AI platform, gaining complete database access without credentials or insider knowledge. The attack exploited a SQL injection vulnerability hidden in JSON field names, exposing massive quantities of sensitive organizational data. Rather than focusing on application security failures, organizations must prepare for perimeter breaches by ensuring data remains protected even after compromise.
Lilli serves as McKinsey's internal AI platform supporting chat, document analysis, and retrieval-augmented generation (RAG) capabilities across over 100,000 internal documents. More than 70% of McKinsey's workforce uses it, generating approximately 500,000 prompts monthly.
How the Attack Unfolded
CodeWall discovered 200+ API endpoints, 22 of which lacked authentication requirements. One endpoint contained a SQL injection vulnerability in JSON field names that conventional security scanners failed to detect. Through blind SQL injection iteration, attackers accessed the production database.
Exposed Data
- 5 million chat messages containing strategy discussions, client engagements, financial data, and merger analysis
- 68 million RAG document chunks representing decades of proprietary research with file paths and metadata
- 728,000 files (PDFs, spreadsheets, presentations, internal documents) accessible via direct URLs
- 95 system prompt configurations across 12 model types revealing behavioral configurations
- 57,000 user accounts and 384,000 AI assistants mapping organizational AI usage
- 1 million files and 217,000 agent messages flowing through external AI APIs, including 266,000 OpenAI vector stores
AI platforms concentrate organizational knowledge into unified systems, making single breaches catastrophically expansive.
The Write Access Problem
System prompts control AI behavior through guardrails, citation mechanisms, refusal policies, and workflow instructions. The CodeWall report emphasizes that the prompt layer has emerged as a critical security target.
Significantly, the attack was not read-only. Attackers could have rewritten prompts using single database updates, potentially causing:
- Subtle manipulation of financial analysis or strategy advice
- Data exfiltration embedded within AI responses
- Guardrail removal enabling document disclosure
- Silent persistence leaving minimal operational traces
While organizations have historically secured code and infrastructure, instructions governing AI behavior remain largely unprotected.
How Encrypted Execution Would Have Changed the Outcome
Encrypted execution enables AI systems to process encrypted representations of prompts, documents, and embeddings without exposing plaintext during storage, retrieval, or inference. DataKrypto's FHEnom for AI implements continuous encryption across the AI lifecycle.
Encrypted execution would have prevented CodeWall's successful breach—not by stopping SQL injection, but by ensuring "even a full infrastructure compromise does not expose the data behind it."
Chat Messages
Encrypted client-side prompts convert into encrypted token sequences before inference. Databases store encrypted data exclusively. Database access yields mathematically unusable information.
RAG Knowledge Bases
All contextual documents encrypt before retrieval pipeline entry. RAG chunks exist as encrypted representations rather than readable text. Database exfiltration yields nothing usable.
System Prompts and Model Configuration
System prompts flow through the same encrypted pipeline as user prompts. Attackers see encrypted configuration data rather than readable instructions. Guardrails and workflow logic remain protected.
Prompt Layer Manipulation
All inputs require integrity validation before entering the encrypted tokenizer. Any stored prompt modification invalidates the signature and is rejected before execution. Prompt poisoning via database writes becomes cryptographically impossible.
Cross-User Data Access
Encrypted execution uses session-based encryption keys rotating per interaction. Data from one session cannot be decrypted in another. Accessed records remain isolated ciphertext.
Third-Party AI APIs
Encrypted execution protects external API pipelines only when third-party services operate within the encrypted execution architecture. Where they do not, decryption occurs before external model access, and encryption cannot protect that boundary.
Raw Uploaded Files
Continuous encryption protects data inside the AI pipeline. Documents processed through RAG encrypt before ingestion. Raw uploads stored outside the pipeline remain within broader infrastructure security domains, with exposure mitigated rather than eliminated.
"Security boundaries must always be stated honestly."
The McKinsey breach illustrates that AI systems need protection from the inside out—not just at the perimeter. When data and models remain encrypted throughout the AI lifecycle, even successful infrastructure attacks yield only unusable ciphertext.