GitBook Breach: SSO Flaw to Cloudflare Key in 5 Hours

By 11 min read
GitBook breach: an SSO flaw led attackers through a GitHub App to a Cloudflare API key

An attacker went from one hijacked customer account to GitBook’s production secrets in about five hours, and GitBook says AI did most of the driving. The route was ordinary: a login flaw, an over-trusted GitHub App, and an API key sitting where code could reach it.

In short: the GitBook breach was a 2 November 2026 intrusion in which an attacker abused a flaw in GitBook’s SSO login flow to act as GitBook staff, used a misconfigured GitHub App to read internal code, found a Cloudflare API key, and through it gained full infrastructure access via a service account. GitBook cut the attacker off the same evening, took the platform offline for roughly 16 hours, and revoked every customer API token.

This article walks through GitBook’s own postmortem: the attack chain, the timeline, what was exposed, what customers must still do, how it compares with the Todoist, 1Password and Cursor breaches of the same month, and what GitBook has not explained.

What is GitBook and why does this breach matter?

GitBook is a hosted documentation platform. Companies write product docs, API references and internal knowledge bases in it, and many sync those docs with GitHub or GitLab through GitBook’s Git Sync feature.

That makes GitBook a classic SaaS supply chain node. A SaaS supply chain node is a vendor that holds tokens and repository access for many customers at once, so a breach at the vendor can reach each customer’s systems. GitBook’s own postmortem makes the same point: it lists SaaS vendors being part of customers’ security perimeter as one of its three lessons.

The breach drew attention in crypto circles first. Decrypt reported that PancakeSwap took its documentation site offline as a precaution, and Crypto Impact Hub reported that trade.xyz restored its docs the same day. Neither company has said its content was altered.

What happened in the GitBook breach?

GitBook first disclosed the incident on its status page on 3 November 2026, describing “a sophisticated, highly targeted attack using AI agents.” A full postmortem, signed by CEO Sara Tandowsky and co-founder and CTO Samy Pessé, followed on 4 November.

The attack chain, step by step

GitBook’s postmortem describes the chain in plain terms. At a conceptual level it ran as follows:

  1. A customer account was hijacked. The attacker’s first foothold was an account at the one customer it was targeting. GitBook does not say how that account was taken.
  2. An SSO flaw turned customer access into staff access. A flaw in GitBook’s SSO login flow let the attacker create login sessions acting as GitBook staff. SSO (single sign-on) lets users log in through their company identity provider instead of a separate password.
  3. A GitHub App leaked repository access. With staff sessions, the attacker queried authentication details of a misconfigured GitHub App installed in GitBook’s own GitHub organisation. A GitHub App is an integration with its own identity and permissions; whoever holds its credentials can act as it.
  4. Internal code led to a Cloudflare API key. The GitHub App gave access to internal repositories and, in GitBook’s words, “eventually, a Cloudflare API key.”
  5. The key opened production. That key exposed production secrets and full infrastructure access through a service account, including deployed code and secrets of GitBook’s edge network.
Six-step GitBook breach chain from a hijacked customer account through SSO, GitHub App and Cloudflare key to production
No single exotic exploit: each step turned one credential into a wider one. Data: GitBook postmortem.

GitBook gives almost no technical detail about the SSO flaw itself. It does not say whether it was a logic error, a misvalidated assertion or a tenant isolation bug. It only confirms the fix shipped at 19:58 UTC on 2 November.

Timeline of the GitBook incident

All times below are UTC and come from GitBook’s postmortem.

Time (UTC) Event
2 Nov, 12:27 First hijacked account at the targeted customer
2 Nov, 16:32 Attacker gains staff sessions, then source code
2 Nov, 17:48 Attacker reaches the production environment
2 Nov, 18:10 Internal alert of unauthorised activity; investigation starts
2 Nov, 19:58 SSO flaw fixed
2 Nov, 20:32 Compromised accounts disabled, attacker cut off, app taken offline
3 Nov, 02:34 Redeploy with new secrets begins; existing API tokens invalidated
3 Nov, 10:52 GitHub App keys rotated
3 Nov, 11:56 All secrets rotated; GitBook fully back online
3 Nov, 22:51 GitLab tokens used for Git Sync rotated
Timeline of the GitBook incident from the first hijacked account on 2 November to the postmortem
Detection came 22 minutes after the attacker reached production, but more than five hours after the first hijacked account. Data: GitBook postmortem.

How long did the attacker have access?

GitBook says the attacker had production access for about 2 hours 45 minutes on the evening of 2 November and about 40 minutes early on 3 November. The timeline table does not show the second window, so it is unclear how the attacker got back in after the 20:32 cut-off or what was done in those 40 minutes.

GitBook’s earlier status update gave the start of unauthorised access as 19:00 CET (18:00 UTC) on 2 November. The postmortem timeline puts the first hijacked account at 12:27 UTC, about five and a half hours earlier. The likely reading is that 19:00 CET marks infrastructure credential access, not the first foothold, but GitBook does not reconcile the two.

Was the GitBook attack really run by AI agents?

GitBook says yes, and it is the company’s assessment, not an independent finding. The postmortem says the attacker moved “with a speed and precision” that pointed to automation and AI, and stresses it “wasn’t a broad scan for outdated software.”

What GitBook has not shown

GitBook names no model, agent framework or tool. It publishes no request rates, user agents or behavioural signatures that support the AI claim. Decrypt noted the same gap in its coverage.

GitBook’s postmortem cites Anthropic’s late-2025 report on a state-backed campaign in which AI did most of the tactical work. GitBook’s 27 November blog post, by Head of Engineering Steven Hall, cites the same campaign. That is context, not evidence about this attacker.

Why the AI label matters less than it seems

Nothing in the chain needed an AI. Every step used a real weakness: a login flaw, an over-permissioned integration and a long-lived key in reach of source code. What automation plausibly changes is tempo: GitBook’s timeline shows 1 hour 16 minutes from staff sessions to production. Defenders who want to know how agent-driven intrusions look elsewhere can compare our breakdown of how to detect AI agent attacks using Unit 42 and NCSC signals.

Four GitBook breach figures: 5.3 hours to production, 22 minutes to alert, 16 hours offline, 3 IOCs
Fast in, fast caught, slow to recover: rotating every secret took most of a day. Data: GitBook postmortem; elapsed times are our count.

What data was exposed in the GitBook breach?

GitBook says the attacker’s activity focused on one customer, but it treated all customer data as exposed. Its postmortem lists these categories.

Category Status according to GitBook
GitBook API tokens Exposed; all personal tokens revoked
Integration tokens and secrets Exposed
Session signing secrets Exposed
Questions asked to GitBook Assistant Exposed
Docs sites using authenticated access Exposed
GitHub repos connected to the GitBook app Attacker could act as the app; actions unknown
GitLab projects connected via Git Sync Attacker could act on GitBook’s behalf; actions unknown
Customer documentation content No evidence of modification
Billing data, passwords, IP addresses Not compromised

The two “unknown” rows are the most important. GitBook says it cannot determine whether the attacker took any action in customer repositories. If your GitHub or GitLab repositories are connected to GitBook, you have to check them yourself.

Who is affected and how do you check exposure?

Every GitBook customer is in scope, because GitBook rotated secrets platform-wide. Your real exposure depends on what you connected:

  • API users: any script or CI job using a GitBook personal API token stopped working when tokens were revoked.
  • Git Sync users: the GitBook GitHub App could act inside every repository you granted it. GitBook rotated those keys itself.
  • Authenticated docs with a custom backend: your signing key was exposed and must be regenerated.
  • Published integrations with secrets, and MCP server users: secrets need rotation and MCP connections need re-authentication.

To check, review your GitHub audit log for actions by the GitBook app between 2 and 3 November, list commits, branch changes and webhook changes made by it, and search your logs for the three IP addresses GitBook published.

How do you detect an attack like this?

GitBook published no MITRE ATT&CK mapping. The techniques below are our own mapping of the steps GitBook describes, to help you find the equivalent pattern in your environment:

  • T1078 Valid Accounts: a customer account and then staff sessions were used as the way in.
  • T1550 Use Alternate Authentication Material: forged or improperly issued SSO sessions.
  • T1213.003 Code Repositories: reading internal repositories through the GitHub App.
  • T1552 Unsecured Credentials: a Cloudflare API key reachable from code.

Log sources and behaviours to watch

  1. Identity provider and SSO logs. Alert when a customer-tenant login produces a session with staff or admin roles. That role jump should never happen.
  2. GitHub organisation audit log. Watch for unusual reads of GitHub App installation details, new installation tokens and access to repositories the app does not normally touch.
  3. Cloud provider API logs. Cloudflare’s audit logs and equivalent logs elsewhere should flag a long-lived API key used from new IP addresses or for new actions, such as reading Worker secrets.
  4. Secret scanning. Run it on internal repositories, not only public ones. A key found by the attacker could have been found by you first.

GitBook’s internal alert fired 22 minutes after production access. The earlier stages, which ran for over five hours, did not trigger it, according to its timeline. That is where most teams have the same blind spot.

What should GitBook customers and SaaS teams do now?

If you use GitBook

  1. Create a new GitBook API token and update every script and pipeline that used the old one.
  2. Rotate third-party tokens and secrets used to connect tools to GitBook, and secrets in any published integration.
  3. If you use authenticated access with your own backend, regenerate the signing key in GitBook and update the backend.
  4. Re-authenticate GitBook MCP server connections.
  5. Review GitHub and GitLab repositories connected to GitBook for changes made around 2 and 3 November.
  6. Search firewall, proxy and SaaS logs for 94.183.188.91, 45.139.84.195 and 198.251.83.217.
  7. Take advantage of controls GitBook says it shipped in the following weeks: read-only tokens, IP allow and deny ranges, 90-day default token expiry and passkeys for non-SSO accounts.

If you run a SaaS platform

  1. Test SSO and tenant boundaries so that no customer-side flow can ever mint a staff session.
  2. Give every GitHub App the narrowest permissions and repository scope it needs, and review installations in your own organisation.
  3. Keep infrastructure keys out of anything a code-reading identity can reach; prefer short-lived credentials over static API keys.
  4. Rehearse a full secret rotation. GitBook needed about 15 hours of downtime to do it.

How does the GitBook breach compare with other November 2026 breaches?

November 2026 brought several developer-platform breaches that followed the same rule: one credential leads to a bigger one.

Breach First foothold Key pivot Outcome
GitBook Hijacked customer account SSO flaw, GitHub App, Cloudflare key Production secrets; all tokens revoked
Todoist Stolen version control credential Modified workflows, sign-in admin credential Production databases reached
1Password Employee GitHub account CI/CD system Malicious backend code pulled account data
Cursor Vendor access key Agent traces with credentials Trojan extension in marketplace cache
Bar chart comparing hours to detection: GitBook 5.7 hours and Todoist 27 hours
GitBook caught its intruder far faster than Todoist did, but still not before production was reached. Data: GitBook and Todoist disclosures; our arithmetic.

What sets GitBook apart

GitBook is the only one of these where the company itself attributes the attack to AI agents. It is also the only one where the root cause was a flaw in the vendor’s own login code rather than a stolen credential. That makes the SSO bug the part most worth learning from, whatever ran the keyboard.

What is still unknown about the GitBook breach?

  • How the customer account was hijacked. GitBook does not say whether it was phishing, a stolen session or a password.
  • What the SSO flaw was. No technical description has been published.
  • Which AI tools were used, and how GitBook knows. No evidence beyond speed and precision has been shared.
  • The 40-minute second window on 3 November. It appears in the summary but not in the timeline.
  • Actions in customer repositories. GitBook says it cannot determine them.
  • Which customer was targeted. It is unnamed.

GitBook has promised to write more about the incident in the coming weeks. Its 27 November blog post focused on new controls rather than new incident details.

The bottom line

The GitBook breach was not a new kind of attack: it was a login flaw, an over-trusted GitHub App and a reachable API key, chained in about five hours. Whether or not AI did the driving, every link in that chain is something a SaaS team can find and fix before an attacker does. If you connect GitBook to your repositories, rotate what GitBook told you to and audit what its app did in your code.

Sources

This article is written for defenders and authorised security testers. Only test systems you own or have written permission to assess.

Frequently asked questions

What happened in the GitBook breach?

On 2 November 2026 an attacker exploited a flaw in GitBook's SSO login flow to act as GitBook staff, then used a misconfigured GitHub App to reach internal repositories and a Cloudflare API key that unlocked production secrets. GitBook cut the attacker off the same evening and took the platform offline to rotate every secret.

Did AI agents hack GitBook?

GitBook says so. Its status update called it a highly targeted attack using AI agents, and its postmortem says the speed and precision pointed to an attack driven largely by automation and AI. GitBook has not named the AI systems or shown how it reached that conclusion.

What data was exposed in the GitBook breach?

GitBook lists API tokens, integration tokens and secrets, session signing secrets, questions asked to GitBook Assistant, and documentation sites using authenticated access as exposed. It says billing information, passwords and IP addresses were not compromised.

Do I need to rotate my GitBook API token?

Yes, in practice it is already dead. GitBook revoked all personal API tokens issued before its cutoff, so you must create a new one and also rotate any third-party tokens or integration secrets connected to GitBook.

Was my documentation changed by the attacker?

GitBook says it found no evidence that customer content was modified. It also says it cannot determine whether the attacker took any action in customer GitHub repositories or GitLab projects connected to the GitBook app, so review those yourself.

Which customer was targeted in the GitBook attack?

GitBook says the attacker focused on one customer but has not named it. GitBook still treated all customer data as exposed and rotated secrets for everyone.

What are the GitBook breach indicators of compromise?

GitBook published three IP addresses for customers to search for in their own logs: 94.183.188.91, 45.139.84.195 and 198.251.83.217. No hashes, domains or user agents were published.

How long was GitBook down?

GitBook says it was offline from 20:32 UTC on 2 November to 11:56 UTC on 3 November, which it describes as about 16 hours. By the timestamps it gives, the gap is closer to 15 hours 24 minutes.

Keep reading

GitBook breachSSO securityGitHub AppsCloudflare API keyAI agent attacksSaaS supply chainincident response