Inside the GitBook Breach: How an AI Agent Attack Reached Production in 5 Hours
A breakdown of the GitBook breach, the AI agent attack behind it, and how to secure AI agents and MCP connections.

Saish Hindlekar
2026 State of Agentic AI Security
How ready is your organization to secure AI agents?
3 quick questions. See how you compare to other security leaders.
In the GitBook breach on November 2, 2026, an attacker moved from a hijacked customer account to production in 5 hours and 21 minutes.
In its November 3 update, GitBook called it an attack using AI agents. Its November 4 post-mortem was more measured, saying the speed and precision pointed to an attack driven largely by automation and AI. GitBook hasn't identified the tools or models involved, so the exact role AI played is still unclear.
What is clear is how fast a chain of identity and credential weaknesses can be exploited now.
What Happened in the GitBook Security Breach?
GitBook is where thousands of companies host their documentation. If you've clicked a Docs link on a developer tool or crypto project, there's a good chance you landed on a GitBook site.
An attacker took over one customer's account.
From there, they found a bug in GitBook's login system that let them pose as GitBook staff.
As fake staff, they reached the keys of a tool GitBook used internally. Those keys opened GitBook's code.
The code path led to a cloud key. And that cloud key opened production.
Each step was a small crack. The attacker just found all of them, in order, in just over 5 hours.
GitBook caught it, cut the attacker off, and took its app and authenticated docs sites offline for about 16 hours to change every lock. Public docs stayed reachable through cached copies for part of that time. PancakeSwap pulled its docs offline as a precaution and later moved them off GitBook entirely.
GitBook Breach: How the Attack Chain Reached Production
GitBook's post-mortem lays out the path step by step. After the first account takeover, every move used access the previous one unlocked.
[IMAGE] File: gitbook-attack-chain.png
Alt text: GitBook attack chain in 5 steps: customer account taken over, SSO flaw used to pose as staff, misconfigured GitHub App, Cloudflare API key reached after the repos, and a service account with full infrastructure access. 76 minutes from staff session to production, and 3 of the 5 steps ran through machine identities

GitBook hasn't disclosed how the initial customer account was compromised. It has described the path that followed, through staff sessions, a misconfigured GitHub App, internal repositories and a Cloudflare API key, but hasn't published every technical detail of how each step was exploited.
Here's the full timeline, including GitBook's response:
[IMAGE] File: gitbook-timeline.png
Alt text: GitBook breach timeline, November 2 to 3, 2026: attacker reached production 5 hours 21 minutes after the first account takeover, stayed about 2 hours 45 minutes, an internal alert fired 22 minutes after production access, 2 hours 22 minutes passed before the attacker was cut off, and GitBook was offline from 20:32 until 11:56 the next day

GitBook says the attacker had production access for about 2 hours 45 minutes on November 2 and about 40 minutes early on November 3. It doesn't say how the attacker got that second window, since its own timeline marks 20:32 as the cutoff. Billing details and passwords were not affected.
Was the GitBook breach an AI agent attack?
GitBook's first status update called it a sophisticated, highly targeted attack using AI agents. Its later post-mortem is more careful. It says the attacker moved with a speed and precision that pointed to an attack driven largely by automation and AI.
GitBook inferred that from how the attacker behaved. There's no forensic proof yet. Here's what we know and what we don't.
Claim | Status |
|---|---|
The attacker chained an SSO flaw, a GitHub App and a Cloudflare key into production access | Confirmed by GitBook |
It took 5 hours 21 minutes from first account takeover to production | Confirmed by GitBook's timeline |
AI agents drove the attack | GitBook's inference, no tool named |
GitBook's own AI products were the entry point | Unsupported. The attack started with a hijacked customer account and an SSO flaw |
How the first customer account was hijacked | Not disclosed |
Whether the attacker touched customer GitHub or GitLab repos | GitBook says it cannot determine this |
The AI angle still matters because the pattern fits what researchers have been warning about. In late 2025, Anthropic reported a state-linked campaign where AI carried out 80 to 90% of the tactical work of an intrusion. GitBook cites that report itself as context. Whether or not an AI agent ran this specific attack, the playbook is now cheap and repeatable.
Machine Identities and Exposed Credentials: The Weak Links in the GitBook Breach
Once the attacker had staff-level sessions, the path ran through credentials and service identities that aren't people.
A GitHub App. Installed as an integration in GitBook's own organization, and misconfigured. Its credentials could be queried from a staff session.
A Cloudflare API key. Reached through GitBook's internal repositories.
A service account. Reached through production secrets, with full infrastructure access.
None of these log in with a password or get a push notification asking if it's really them. They just hold keys, often with more access than they need, and they keep holding them long after anyone remembers why.
GitBook's first lesson in its post-mortem: every forgotten credential is a liability. Least privilege, short-lived credentials and secret scanning have to be the default.
The attacker went straight for the machines that already had the access.
Why this matters as AI agents get keys to your systems
Most companies are adding a new kind of machine identity right now, and fast: AI agents.
A coding agent gets a GitHub token. A support agent gets CRM access. An internal assistant gets connected to docs, tickets and Slack through MCP servers. Each connection is another key, held by something that isn't a person, often granted broad access because scoping it properly slows the project down.
Now put that next to the GitBook chain. All an attacker moving at machine speed needs is one over-permissioned identity it can reach, then the next one, then the next. Every agent and MCP connection you add is another link that chain could run through.
[IMAGE] File: gitbook-agent-access-map.png
Alt text: Illustrative access map of 3 AI agents: a coding agent reaches code repos, an MCP assistant reaches code repos, docs and tickets, and cloud and production, and a support agent reaches customer data and docs and tickets

There's a second exposure too. GitBook listed questions visitors asked its AI Assistant among the data the attacker could reach, and told MCP users to re-authenticate after the incident. When AI tools are wired into a platform, their conversations and connections become part of what a breach can touch.
We saw a version of this in the LiteLLM compromise, where the AI toolchain was both the entry point and the target.
Every key you hand an agent is one more an attacker can try.
GitBook Security Breach: 6 Steps Customers Should Take Now
GitBook treated all customer data as exposed, including customers who weren't targeted. It rotated its own secrets and invalidated existing API tokens, but some steps are on you.
Create a new GitBook API token and update every script or pipeline that uses it
Rotate third-party API tokens and secrets you connected to GitBook
Rotate secrets for any integration you published on GitBook
If you run a custom backend for authenticated docs, regenerate the signing key in GitBook and update your backend
Re-authenticate any MCP server connected to GitBook
Review the GitHub and GitLab repos connected to GitBook for unexpected commits, branches or settings changes. GitBook says it cannot rule out actions there
Search your logs for the indicators of compromise below
Indicator of compromise | Type |
|---|---|
94.183.188.91 | IP address |
45.139.84.195 | IP address |
198.251.83.217 | IP address |
You don't need to rotate GitHub App or GitLab Git Sync keys yourself. GitBook rotated those credentials on its side. If your sync looks broken after the incident, reconnect it.
What security teams should change
You don't need to have been a GitBook customer to learn from this. 5 shifts worth making now:
Inventory every non-human identity, including AI agents. You can't scope what you can't see. That means service accounts, GitHub Apps, API keys, and every agent and MCP server your teams have connected.
Shrink the blast radius of each key. Least privilege is old advice, and it matters more when an attacker can test every key in minutes. An agent that reads tickets shouldn't be able to write to production.
Make credentials short-lived. A key that expires in an hour is far less useful to an attacker than one that's been valid since 2023.
Watch how each identity behaves. GitBook caught this because an internal alert fired 22 minutes after the attacker reached production. Agents and machine identities need the same runtime monitoring humans get, tuned for what normal looks like for each one.
Plan for machine-speed response. GitBook's alert fired at 18:10, but the attacker wasn't cut off until 20:32. That 2-hour-22-minute gap between knowing and stopping is the window an automated attacker gets to work with. If an attack can reach production in 5 hours, your containment playbooks need to work in minutes.
How Akto Helps Secure AI Agents and MCP Servers
The GitBook chain ran through an SSO flaw, a GitHub App, a Cloudflare key and a service account. Those sit with your IAM, SSO and secrets management tools.
Akto secures the layer growing fastest on top of them: the AI agents and MCP servers in your environment, and the tools and data they connect to. As attackers get faster with AI and teams hand agents more keys, that's the layer Akto's Agentic Security Platform is built for.
It works in 3 moves: discover every agentic asset, test it like an attacker would, and enforce guardrails on what it can do.
Key Security Lessons from the GitBook Breach | Akto capability | What it does |
|---|---|---|
You can't secure agents you can't see | Agentic AI Discovery | Automatically discovers and catalogs MCPs, AI agents, tools and resources across your infrastructure, cloud and employee laptops, using 80+ connectors |
Over-permissioned access is how chains form | Agentic Security Posture Management | Shows where agents and MCP servers carry risky access or configuration, so you can fix it before it's chained |
Find the cracks before an attacker chains them | Automated Agentic Red Teaming | Continuously tests agents and MCPs with 4,000+ AI probes for prompt injection, poisoned resources and tool misuse |
An agent should only do what its job needs | MCP and AI Agent Guardrails | Enforces enterprise policies that restrict risky or unauthorized actions |
Detection has to move at machine speed | Agentic Runtime Protection | Watches agents in production and blocks cascading failures in real time |
Akto covers both places agents live. Akto Atlas gives visibility and guardrails for the AI agents, LLMs and MCP tools employees use on their devices. Akto Argus brings runtime security and continuous testing to the AI agents running in your cloud.
If you're connecting AI agents to your systems faster than you can track them, book a Agentic Security Demo.
Sources
Experience enterprise-grade Agentic Security solution
