Defang data breach: dev GitHub App let attacker copy database
Part of the Defang story · since 25 Nov
- Wed 25 Nov, 23:56 UTC. cybersixt, first report. Defang data breach: dev GitHub App let attacker copy database. This article, 1st of 1.
Defang, a service that deploys Docker Compose projects into customers' own cloud accounts, says an attacker copied its production credentials and its main database on 12 November and went unnoticed for eleven days. In a detailed incident post published on 24 November, the company says every Defang Portal account is in the copied database, and that customers who installed the Defang GitHub App have checks to run in their own repositories and cloud accounts.
How the attacker got in
The entry point was a second GitHub App that Defang used for local development and testing. According to Defang, it was installed on two of the company's own repositories and had more permissions than it needed, including permission to change deployment environments. Acting as that app, the attacker pushed a commit and tagged it as a release. Defang's production environment trusted release tags, so the attacker's code ran in Defang's CI with access to production credentials.
Defang's timeline puts the first credential-copying workflow at 06:05 UTC on 12 November, against development and staging. Production credentials were copied at 06:26 and the database between 07:57 and 08:10. A routine security scan found the activity on 23 November, when Defang confirmed the database copy, replaced its credentials and emailed affected users. The company says its logs are not detailed enough to rule out use of the credentials between 12 and 23 November. It also says it learned of a security issue with a dependency on 15 November and installed the update, without saying whether that issue was related.
What was exposed
The database held names, email addresses, GitHub or GitLab usernames and organisation names, sign-up answers, cloud account and project IDs (no credentials), deployed Compose files, and the names of repositories the GitHub App could access, including private ones. It also held copies of deployment state from deploys between 12 October and 19 November, which Defang says can include database passwords and environment variables built from secrets.
The more serious exposure is downstream. The copied credentials included the Defang GitHub App's key and the GitHub sign-in tokens Defang kept, stored encrypted but with the encryption key taken too. Until they were replaced on 23 November, Defang says, anyone holding them could push commits, change workflow files, start workflow runs, overwrite Actions secrets and change branch protection in customers' connected repositories.
Because the cloud role Defang sets up for GitHub deploys trusts workflows in the customer's repository and has administrator access, a workflow started that way could receive the customer's cloud credentials. A Stripe key was also taken, which Defang says exposed billing names, addresses, tax IDs and the last four digits of cards, but not full card numbers.
What Defang users should do
Defang asks customers to review connected repositories for commits, tags, workflow changes, workflow runs, secrets, deploy keys or collaborators they do not recognise since 11 November, especially anything from defang-app[bot]. It also asks them to restrict every defang- deployment environment to the deploy branch, which GitHub's environment protection rules support, and to revoke and reconnect Defang in GitHub.
In the cloud, customers should check who assumed the Defang deploy role since 11 November (on AWS, AssumeRoleWithWebIdentity calls on defang-cd-CIRole in CloudTrail) and narrow its trust to one branch or environment, as GitHub's OIDC guidance for AWS describes. Anyone who deployed between 12 October and 19 November should change database passwords and any secret built into environment variables, then redeploy.
The lesson for other teams is the trust chain: a test app with write access to a release tag was enough to run code with production secrets. Defang says it has suspended that app, replaced all production credentials, signed out every session and notified GitHub and the relevant authorities. The post drew discussion on Hacker News after it was published.
How the story developed
1 article from 1 outlet since 25 Nov. Still developing; the latest report was 3 hours ago. This was the first report.
- Wed 25 Nov, 23:56 UTC. cybersixt, first report. Defang data breach: dev GitHub App let attacker copy database. This article, 1st of 1.
- No CVE
- Larger: an outlet’s first report
- Coverage over time
Show all 1 articles as a listHide the list
- Wed 25 NovDay 01
- Defang data breach: dev GitHub App let attacker copy database23:56 · cybersixt · First report · This article, 1st of 1
Sources
More reporting
- Eneco data breach confirmed in Belgium after initial denial25 Nov
- 1Password data breach: attacker copied customer account data25 Nov
- Acquia breach may have exposed customer credentials25 Nov
- Planzer cyberattack: Galaxus customers' delivery data stolen25 Nov
- ENEOS app suspended after unauthorised access to its systems25 Nov
Written by CyberSIXT from the sources above.How we reportCorrectionsRSS