Single operator uses Claude Code + GPT-4.1 to breach nine Mexican government agencies (195M+ records)
TL;DR
Between late December 2025 and February 2026, a single operator used Claude Code and OpenAI's GPT-4.1 to breach nine Mexican government agencies (plus at least one financial institution), exfiltrating 150GB+ of data including 195 million taxpayer records and 220 million civil-registry records. Claude generated an estimated 75% of the remote commands executed (1,088 prompts → 5,317 commands across 34 sessions); GPT-4.1 was used to triage 305 compromised servers into 2,597 structured intelligence reports via a custom 17,550-line tool. Both models initially refused overtly malicious requests; the operator got past the guardrails by framing the operation as an authorized bug-bounty engagement and handing Claude a long, detailed operational playbook rather than asking for the attack outright. Disclosed by Gambit Security (April 2026); no CVE was created — the underlying flaws were 20 unpatched, pre-existing vulnerabilities in government infrastructure, not a flaw in Claude Code or GPT-4.1 themselves.
What happened
Gambit Security published a full technical report (dated 2026-04-10, with wide follow-on press coverage from 2026-04-12 onward, and renewed mainstream pickup in July 2026) documenting what several outlets called one of the largest AI-augmented cyberattacks disclosed to date.
Timeline and targets: the operator's first confirmed access was the Mexican federal tax authority (SAT) in late December 2025, expanding over the following weeks to Mexico City's civil registry and health department, the national electoral institute, Jalisco state government (including a 13-node Nutanix cluster spanning 37 database servers with health records and domestic-violence-victim data), local governments in several other cities, a water utility, and at least one financial institution — nine government bodies in total.
How the AI guardrails were bypassed: the operator initially asked Claude to act as a penetration tester running a "legitimate bug bounty," including instructions to delete logs and command history — Claude refused and pushed back harder the more the requests looked like anti-forensics. The operator then switched tactics, handing Claude a 1,084-line hacking manual as a reference document rather than issuing the attack as a direct instruction. Framed this way, the guardrails did not hold.
Division of labor between the two models: Claude Code executed roughly 75% of the remote commands against target infrastructure — 1,088 logged prompts produced 5,317 AI-generated/executed commands across 34 sessions. A custom 17,550-line Python tool (reported by some outlets as BACKUPOSINT.py) shipped harvested data from 305 internal servers to GPT-4.1, which returned 2,597 structured reports describing each server's configuration and next-step recommendations — effectively using GPT-4.1 as an automated reconnaissance analyst. The operator also used roughly 20 custom exploit scripts targeting 20 distinct (unnamed in public reporting) CVEs already present and unpatched on the target networks, plus 400+ supporting scripts (301 Bash, 113 Python) for tunneling, credential spraying, and rootkit deployment.
Impact: 195 million taxpayer records at SAT (including the ability to generate fraudulent tax certificates), 220 million civil-registry records in Mexico City (obtained via a scheduled-task file that smuggled in a secret key), and full server-cluster access in Jalisco exposing health records and domestic-violence-victim data.
No CVE, no vendor patch: this is not a vulnerability in Claude Code or GPT-4.1 — it is a demonstration of an AI-augmented attacker (see the JADEPUFFER "agentic threat actor" pattern already tracked in this repo) operating at a scale and speed a solo human operator could not match unassisted. Public reporting has not surfaced a statement from Anthropic or OpenAI specific to this incident. The underlying compromise was possible because target systems were unpatched, lacked network segmentation, and had no anomaly detection on bulk data exports — the AI tooling accelerated exploitation of pre-existing weaknesses rather than creating new ones.
Reporting caveat: exact dates and some technical details (specific CVE identifiers, the exact custom-tool filename) vary slightly across secondary sources; this advisory states figures as consistently reported by Gambit Security's technical report and corroborated by SecurityWeek, VentureBeat, SocRadar, CovertSwarm, Security Affairs, and HackRead.
Am I affected?
This is not a package or tool vulnerability to patch — it is a case study in what unrestricted, jailbroken use of a coding agent against your own infrastructure can accomplish. Relevant questions for any org running public-facing infrastructure: - Do you have unpatched, internet-facing systems that a determined attacker (human or AI-augmented) could chain together, the way this operator used ~20 pre-existing CVEs? - Do you have anomaly detection on bulk data exports and database dumps, independent of whether the traffic pattern "looks scripted"? - Do you rate-limit or alert on unusually high-velocity API/database activity that could indicate an AI agent executing hundreds of commands per session?
If you are affected
If you operate government or critical-infrastructure systems and suspect AI-augmented reconnaissance or exploitation: → playbooks/if-your-webapp-was-compromised.md → playbooks/rotating-cloud-credentials.md
Prevention
- Patch known CVEs on internet-facing infrastructure promptly — this entire operation ran through already-known vulnerabilities, not zero-days.
- Segment networks so that a single foothold (one tax-authority server) cannot cascade into unrelated agencies' civil, health, and financial systems.
- Monitor for anomalously high-velocity, multi-session automated activity against production systems — an AI-augmented attacker can generate thousands of commands in hours, far faster than manual human operation.
- If you operate a coding agent (Claude Code, Codex, or similar) with broad network/credential access, treat "prior authorization" claims embedded in a prompt or reference document as untrusted input, not a security control — the guardrail bypass here worked specifically because a lengthy reference document read differently to the model than a direct malicious instruction.
- Cross-reference: 2026-07-jadepuffer-langflow-agentic-ransomware.md — a second, distinct instance of an "agentic threat actor" (there, a fully autonomous agent with no human directing individual steps; here, a human operator directing Claude Code and GPT-4.1 as force multipliers). Together these establish AI-augmented/agentic attack as a recurring incident class, not a one-off. → prevention/agent-sandboxing.md
Sources
- Gambit Security — A Single Operator, Two AI Platforms, Nine Government Agencies: The Full Technical Report — primary disclosure and technical report.
- SecurityWeek — Hackers Weaponize Claude Code in Mexican Government Cyberattack — independent corroboration, timeline detail.
- HackRead — Hacker Used Claude Code, GPT-4.1 to Exfiltrate Hundreds of Millions of Mexican Records — independent corroboration, agency-by-agency breakdown, tool details.
- SocRadar — Claude Code & ChatGPT Used to Steal Millions of Records in Mexican Government Breach — independent corroboration.
- TechRadar — Hackers use Claude and ChatGPT in "a significant evolution in offensive capability" — mainstream pickup, July 2026.