Create a new GitBook API token, rotate integration secrets and re-authenticate the GitBook MCP server
GitBook breach: attacker reached production secrets, all customer API tokens revoked · Security incident · Web · GitBook · Nov 3, 2026
What happened
GitBook says an attacker got into its systems on 2 November through a flaw in its SSO login flow, creating sessions that acted as GitBook staff. From there they read the credentials of a misconfigured GitHub App, reached internal code, then a Cloudflare API key and production secrets with full infrastructure access. GitBook took the app offline for about 16 hours, rotated every secret and revoked all personal API tokens. It treats all customer data as exposed, including API tokens, integration tokens and secrets, session signing secrets and docs behind authenticated access. The attack used AI agents and appears aimed at one customer; GitBook found no evidence other customers' content was changed.
How to prevent it
Give every tool you connect its own token with the smallest scope, keep a list of where each one lives, and rotate all of them the day a provider reports a breach.
Fix prompt for your own AI tool
Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.
I use GitBook and connect it to other tools. Help me respond to GitBook's November 2026 security incident: 1) List every place my projects use a GitBook API token (apps, CI secrets, scripts, .env files) so I can swap in a new one. 2) List the third-party tools and published integrations I connect to GitBook and tell me which secrets to rotate. 3) If I use GitBook authenticated access with my own backend, show me where the signing key lives in my code so I can regenerate it and update it. 4) Remind me to re-authenticate the GitBook MCP server in my AI tools. Don't change anything until I approve. Never ask me to paste tokens or .env contents; tell me where to check them myself.
Why this keeps happening: leaked secrets & api keys
Secret keys placed in front-end code, mobile bundles or public repositories can be found by automated scanners and abused, often running up large bills on AI or cloud accounts before anyone notices.
A quick checklist before you ship
- Keep secret keys only in server-side environment variables, never in browser or app code.
- Set spend limits and usage alerts with every AI and cloud provider.
- Turn on secret scanning and push protection for your repositories.
- If a key leaks, revoke and replace it first; deleting the file is not enough.
More on this: every leaked secrets & api keys story and our related guide.
Tools involved
Related stories
- Keep secrets out of what your AI agent can read
GitGuardian: real leaked API keys recovered from three LLMs; Claude Code commits leak more - If you self-host n8n with several users, upgrade to 1.123.96, 2.47.6, 2.48.3, 3.2.2 or later and check active workflows for triggers using credentials their owner didn't set
n8n let a member activate a workflow using someone else's credential if they knew its ID - If you self-host the LiteLLM proxy with Azure models, upgrade to 1.106.9, 1.108.6, 1.109.1 or later and rotate the master key if low-trust users had access
LiteLLM proxy: a normal chat request could leak the master key and provider API keys through an Azure error
Source: original post on Web ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.