deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (native)

Defang breach: stolen CI credentials let attacker copy full user database

Defang says an attacker abused an over-privileged development GitHub App to run code in its CI, steal production credentials, and download its main database on November 12, 2026.

Defang breach: stolen CI credentials let attacker copy full user database

What happened

On November 12, 2026, an attacker gained access to Defang's build infrastructure, copied the credentials the company uses to operate its service, and used them to download a copy of its main database. Defang confirmed the breach on November 23 after a routine security scan flagged suspicious activity in its repositories, and published a detailed disclosure on its blog on November 24. According to Defang, every Defang Portal account is included in the copied database, and the company is emailing affected users directly.

How the attacker got in

Defang used a separate GitHub App for local development and testing that was installed on two of the company's own repositories and carried more permissions than it needed, including the ability to change deployment environments. Acting as that app, the attacker pushed a commit to one of those repositories and tagged it as a release. Because Defang's production environment trusted release tags, the attacker's code executed in CI with access to production credentials, which were then copied.

According to Defang's timeline, the visible activity ran from roughly 06:00 to 10:30 UTC on November 12: build credentials were copied against development and staging at 06:05, production credentials at 06:26, and the database between 07:57 and 08:10. The stolen credentials remained valid until Defang replaced them on November 23, and the company says its logs are not detailed enough to rule out further use after November 12.

What was exposed

The database copy contains users' names and email addresses, GitHub or GitLab usernames and the organizations those accounts belong to, signup questionnaire answers, and the names of repositories accessible to the Defang GitHub App, including private ones. It also includes connected cloud account, project or subscription IDs and regions — though no cloud credentials — plus Compose files and deployment-state snapshots from deploys between October 12 and November 19, which can contain database passwords and environment variables derived from defang config values, such as connection strings with embedded passwords.

For users who installed the Defang GitHub App, the attacker also obtained the app's key and Defang's stored GitHub sign-in token. Defang says the token was encrypted, but the encryption key was stolen as well. Until replacement on November 23, those secrets would have allowed anyone to push commits and branches, modify workflow files and start workflow runs, overwrite Actions secrets and variables, change deployment environments and their protection rules, open and merge pull requests, and alter repository settings including branch protection, deploy keys and collaborators. A workflow started this way could receive the user's cloud credentials, because the deploy role Defang sets up for GitHub trusts workflows in the repository.

The stolen material also included a Stripe key, Defang's payment provider. Someone holding it could have read billing records: name, email, billing address, tax ID, card brand, last four digits and expiry date, and subscription and invoice history. Defang stresses that full card numbers and security codes were not exposed, since Stripe holds those and never makes them available to Defang or to holders of its key.

What was not exposed

Defang states that user passwords were not at risk because the service has none — sign-in happens through GitHub, GitLab or emailed codes. Cloud credentials are never held by Defang, and BYOC deployments run in the customer's own account. Repository contents are not stored in Defang's database, and defang config values stay in the user's cloud account, apart from the copies embedded in deployment state.

Remediation and what users should do

Defang replaced its production, database, payment and email credentials and the GitHub App key on November 23, revoked stored GitHub sign-in tokens, signed out every session, and invalidated all access tokens issued before that date. It stopped retaining deployment-state copies on November 19 and deleted existing ones, cancelled pending cloud invite links, suspended the over-privileged development app, reverted deployment configurations the attacker had altered, installed a dependency security update on November 15, and notified GitHub — which is helping audit for token misuse — along with users and relevant authorities.

Defang advises all users to be wary of phishing that leverages their real name and username, and to sign in again. GitHub App users are told to audit connected repositories for unrecognised activity since November 11 — new commits, branches or tags, changes under .github/workflows, workflow runs they did not start, altered Actions secrets, new deploy keys or collaborators, and changed branch protection — paying particular attention to actions by defang-app[bot]. They should also lock down defang-prefixed deployment environments so only the deploy branch can receive cloud credentials, and revoke and reconnect Defang's GitHub authorization. Customers deploying via GitHub Actions should check who has assumed the deploy role since November 11; on AWS that role is typically defang-cd-CIRole, searchable in CloudTrail via AssumeRoleWithWebIdentity calls.

Why it matters

The incident is a concrete demonstration of how CI/CD trust chains turn a single over-privileged integration into full compromise: a development-only GitHub App with unneeded permissions became a path into production. It also shows the cost of retaining sensitive artifacts — deployment state containing secrets — and of granting CI blanket trust in release tags. For Defang users the consequences are immediate and user-facing: exposed contact details enable convincing targeted phishing, and the stolen GitHub tokens and Stripe key remained valid for eleven days before anyone noticed.

  • #security
  • #data-breach
  • #github
  • #ci-cd
  • #devops

Related posts