Join our Newsletter — 33% off our NHI Course
Home› Guides› The CircleCI Breach for Beginners: How Malware on…
Guide Non-Human Identity (NHI)

The CircleCI Breach for Beginners: How Malware on One Laptop Forced Every Customer to Rotate Secrets

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 3 December 2026 10 min read
On this page

The CircleCI breach was a 2022 attack where stolen access to one engineer's account exposed customers' stored secrets.

This guide is for anyone who wants a plain account of what happened and what it teaches. You do not need to write code to be affected: if your website or app is built by an automated service, that service may hold keys to your other systems.

In short

  • In December 2022, harmful software on a CircleCI engineer's laptop copied a signed-in session that had already passed a second check [1].
  • The attacker used it to reach production systems and copy customer secrets, plus the keys that unlocked them [1].
  • On 4 January 2023 CircleCI told every customer to replace all secrets stored on the platform [1].
  • The lesson: build services hold many keys for software, so keep few of them, make them short-lived and know where they are.

What you will learn

  • Explain what a build service does and why it holds secrets.
  • Describe how a stolen session got past a second check.
  • Spot which of your own secrets sit with outside services.
  • Ask your team how fast it could replace them all.
Build robot (CI/CD service)
a service that tests and ships code automatically each time it changes.
Secret for software (token or key)
a code a program shows to prove it may use another system.
Replacing a secret (rotation)
making a new secret and switching off the old one.

What is the CircleCI breach?

Think of a building manager who keeps spare keys for every tenant in one cabinet. If a thief opens that cabinet, every tenant has to change their locks. The CircleCI breach was like that, for software keys.

CircleCI runs a CI/CD service (a build robot that tests and ships code when it changes). To do that job, customers give it secrets, such as tokens and keys for their cloud accounts and code stores. These secrets belong to software, not to people. Experts call such software accounts non-human identities.

In December 2022, an attacker got into CircleCI's systems and copied those customer secrets [1]. So CircleCI asked every customer to assume their secrets were taken and replace them [1].

Where the comparison stops working: a missing key cabinet is easy to notice. Copied secrets leave no gap, so customers could not tell at a glance which ones had been used.

For the basics of how build robots get their own access, read CI/CD Pipeline Identities for Beginners. This page tells the CircleCI story.

Why does it matter?

One service held secrets for many customers. A break-in at the service meant work for all of them, even those who did nothing wrong.

If a developer or agency builds your website

What could happen: a build service they use is breached, and keys to your hosting or payments are exposed.

Check this: ask which outside services hold keys to your systems, and who would replace them.

Next: Third-Party Access for Beginners

If you are new to IT or developer work

What could happen: a secret you added to a build service years ago still works, and nobody remembers it.

Check this: keep a list of every secret you store in a build service, with an owner.

Next: Secrets Rotation for Beginners

If you manage a team

What could happen: a supplier tells you to replace every secret today, and nobody knows how long it will take.

Check this: ask for a written plan to replace all build secrets in one day.

Next: Unrotated Secrets After a Breach for Beginners

What does it look like?

Here is a made-up list of secrets a small firm might keep in a build service. Lists like this had to be worked through.

Example only. All values are made up.

Build service: settings for project EXAMPLE-shop
CLOUD_DEPLOY_KEY   = FAKE-0000-EXAMPLE   added 2019   (1)
CODE_STORE_TOKEN   = FAKE-0000-EXAMPLE   added 2021   (2)
PAYMENTS_TEST_KEY  = FAKE-0000-EXAMPLE   added 2022   (3)
Owner:             (blank)                            (4)
Last replaced:     never                              (5)
  1. In a real file, this line would contain a key that can change the firm's cloud hosting.
  2. A token that lets the build robot read and change the firm's code.
  3. A key for a payment service. Even test keys can reveal details.
  4. No named owner, so nobody is sure who should replace it.
  5. Never replaced, so a copy taken long ago may still work.

Why this is risky: long-lived keys with no owner are slow to find and replace after a supplier breach.

The safer way: store as few keys as you can, give each an owner, and use short-lived access where the service supports it.

How does it work?

CircleCI's own report sets out the steps [1].

  1. Harmful software lands on a laptop. On 16 December 2022, malware (harmful software) reached an engineer's laptop. The antivirus did not catch it.
  2. The session is copied. The malware stole a session cookie (a small file that keeps you signed in). The engineer had already passed a second check, so the copied session looked trusted.
  3. The attacker acts as the engineer. That engineer could create access to production systems, so the attacker could too.
  4. Secrets are copied. On 22 December 2022 the attacker took customer secrets. They were scrambled at rest, but the attacker also took the unlocking keys from a running program.
  5. Customers replace secrets. After a customer reported odd activity on 29 December, CircleCI investigated. On 4 January 2023 it told customers to replace all secrets.
Diagram titled How one laptop led to every customer rotating secrets. Four boxes in a row joined by arrows. Box 1, Malware: harmful software on an engineer's laptop was missed by antivirus. Box 2, Stolen session: it copied a signed-in session that had already passed a second check. Box 3, Production: the attacker took customer secrets and the keys that unlocked them. Box 4, shown in green, Rotate: customers were told to replace every secret they had stored there. A note at the bottom says the source is CircleCI's incident report of January 2023, with dates from 16 to 22 December 2022.
Figure 1. The chain from one laptop to every customer, based on CircleCI's report.

CircleCI said that fewer than five customers had told it of unauthorised access to other systems because of the incident [1]. It also called the event "a systems failure", not one person's fault [1].

After the breach, CircleCI said it limited production access to a very small group and added extra checks for them. It also planned automatic token replacement and easier use of OIDC (a way to get short-lived access instead of storing long-lived keys) [1].

A worked example

This story is made up to show the idea.

Ula Rinaldi runs Oak Pottery, a small online shop. A freelance developer, Imani Abbott, built the shop. Each time Imani changes the site, a build service tests it and puts it live.

One morning Imani reads a notice from the build service. It says a breach may have exposed stored secrets, and every customer should replace them now.

Imani opens the project settings. She finds four keys. One reaches the hosting account. One reaches the code store. One is a payments test key. The fourth has a name nobody recognises, added three years ago.

Ula asks two questions. Which keys could cost us money? Who can switch them off today? Imani starts with the hosting key, then the code store token. She makes a new key, adds it to the build service, then turns off the old one. She checks the shop still works after each change.

The unknown key takes longest. Imani asks the hosting company, which confirms it is an old key from a past test. She deletes it.

Imani then checks the records the hosting company keeps. In the records available to her, she sees no use of the old keys from places she does not recognise.

Afterwards Ula and Imani agree on three changes. Keep a list of every key with an owner. Use short-lived access where the service offers it. Practise replacing all keys once a year.

Myths and mistakes

What people thinkWhat is true
A second check at sign-in keeps a session safe.Here the attacker copied a session that had already passed its second check [1]. Extra checks for risky actions help.
Scrambled (encrypted) secrets are safe even if copied.Only if the unlocking keys stay apart. The attacker took those too [1].
If nothing bad happened yet, we do not need to replace keys.CircleCI told customers to assume access and act [1]. A copied key can be used later.
Deleting a key from the build service is enough.The old key must also be switched off at the system it opens. Otherwise a copy may still work.
Only big tech firms use build services.Small sites and apps often do, through a developer or agency.

What can I do this week?

  • Ask your developer or agency which build or hosting services hold keys to your systems.
  • List each key with an owner and the date it was last replaced.
  • Delete keys nobody can explain, after checking with the system they open.
  • Ask whether short-lived access can replace stored keys for your cloud or hosting.
  • Write down who would replace every key if a supplier asked you to today.

Checklist

  • I know which outside services store secrets for my systems.
  • Every stored secret has a named owner.
  • I know how to switch off an old secret at the system it opens.
  • Unused secrets are deleted.
  • Short-lived access is used where the service supports it.
  • Staff who can reach production systems need an extra check for risky actions.
  • We have practised replacing all build secrets.

Common questions

What did the attacker take in the CircleCI breach?

Customer secrets stored on the platform. CircleCI said these included environment settings, tokens and keys for other systems. The data was scrambled at rest, but the attacker also took the keys needed to unscramble it from a running program [1].

Why did every customer have to replace secrets?

Because CircleCI could not rule out that any stored secret had been copied. It told customers to assume their secrets had been accessed and to replace them. It also asked them to look for odd activity from 16 December 2022 onwards [1].

Did two-step sign-in fail?

Not in the usual sense. The engineer passed the second check. The malware then copied the session that followed, so the attacker did not need to pass the check again [1]. That is why extra checks before risky actions matter.

What is short-lived access?

Access that is created for one job and expires soon after. Instead of storing a long-lived key, the build robot asks for fresh access each time. CircleCI said it would make this easier through OIDC after the breach [1].

Who was behind the attack?

CircleCI's report describes an unauthorised third party and does not name one. This guide does not guess. The useful lessons for defenders are about where secrets are kept and how fast they can be replaced.

Where next?

Ready for the detail? Read the practitioner guide: CircleCI Security Guide. It goes further into how to set up contexts, tokens and short-lived cloud access in CircleCI.

Also useful:

Related NHI Mgmt Group resources: Non-Human Identities for Beginners, Secrets Management for Beginners and Leaked Secret Response for Beginners.

Key terms

CI/CD pipeline
An automated set of steps that tests code and puts it live when it changes.
Non-human identity
An identity used by software, such as a build robot or app, rather than a person.
Pipeline secret
A key, token or password a build robot uses to reach other systems.
Copying the small file that keeps someone signed in, so an attacker can act as them.
Credential rotation
Replacing a secret with a new one and switching off the old one.
Malware
Harmful software that damages, spies on or takes control of a device.

Sources and further reading

  1. CircleCI, "CircleCI incident report for January 4, 2023 security incident", CircleCI blog, January 2023. https://circleci.com/blog/jan-4-2023-incident-report/ (accessed 3 Dec 2026).

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.