How do you stop a new sign-up from making itself an owner of someone else's account?
In November 2026 a free sign-up made itself owner of a vendor's own org through one invitation check. Authorize every grant on the server.
3 min readDEV GroupProduct engineering · Security
Two breaches that began with a grant of access
Because the code that hands out access is rarely tested as hard as the code that uses it. Check every invitation, role change, and session against the account it lands in, on the server, and treat a new owner as not yet trusted. Two incident reports from November 2026 show the path. On 8 November Dosu published a post-mortem for 2 November. An attacker signed up for a free account, then used an incorrect row-level security check on organization invitations to invite themselves as owner of Dosu's own internal organization. As owner, they changed the server URL of that organization's integrations to a tunnel they controlled, and Dosu sent the integrations' credentials to it, including a read-only database token and a GitHub token for its bot account. With the bot token they opened a pull request, and CI, which ran an infrastructure preview on pull requests with production cloud credentials, sent those credentials out too. Dosu says the attacker went from a new account to its cloud project in under two hours, and that several penetration tests, one the week before, had missed the flaw. On 4 November the documentation platform GitBook published a post-mortem for an attack that also began on 2 November: a flaw in its SSO login flow let the attacker create sessions acting as GitBook staff, which led to a misconfigured GitHub App, internal repositories, a Cloudflare API key, and production secrets. GitBook took its app offline for about 16 hours to rotate everything.
Limit what a new owner can reach
Then limit what a fresh owner can do with the role. Changing where an integration sends its credentials, a webhook URL, or an SSO setting should require recent re-authentication and notify the existing owners, and stored secrets should not go to a new address until someone confirms the change. Keep production credentials out of any CI job a pull request can trigger, and deploy with short-lived credentials instead of stored keys, the two CI changes Dosu made after its incident. GitBook's lessons point the same way: least privilege, short-lived credentials, and secret scanning as the default. Server-side checks on every access grant, tests that try to cross from one customer account into another, re-authentication on sensitive settings, and CI that cannot see production secrets are product engineering work, the layer that decides whether a free sign-up stays a free sign-up, and that is where we fit.
- Related: keeping the builder role from becoming an admin
- Related: who can point your webhooks somewhere else
- Related: keeping integration and automation tokens from becoming a breach
- Product engineering
- Running an app where customers invite their own teams? Start a conversation
Sources
- Nov 2, 2026 Security Incident Post-Mortem. Dosu. November 8, 2026.
- Security incident, November 2026 (incident post mortem). GitBook. November 4, 2026.
Was this useful?
Related notes
Applied AI2 min read
How do you keep an AI coding agent's saved approvals from committing secrets?
An agent that remembers an approval can save a secret into a file inside the repo. Keep that file out of git, and do not approve the literal command.
- Agents
- Secrets
- CI
Reliability3 min read
How do you keep a dependency install from running with the secrets on a developer's machine?
A dependency install is code execution. Review the lockfile, allow native builds only for packages you named, and keep secrets off that machine.
- Dependencies
- Secrets
- CI
Applied AI2 min read
Why can't an AI agent's tool list be its permission system?
The tool list is a hint, not a control. Enforce authorization where the tool runs, and key each approval to the arguments.
- Agents
- Authorization
- Audit