Join our Newsletter — 33% off our NHI Course
Home› Guides› Credential Chaining for Beginners: How Attackers Hop From…
Guide Non-Human Identity (NHI)

Credential Chaining for Beginners: How Attackers Hop From One Stolen Key to the Next

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 28 November 2026 11 min read
On this page

Credential chaining is when one stolen password or key leads an attacker to more of them.

This guide is for anyone who has wondered how one small leak turns into a big breach. You do not need to be technical to be affected: if your business uses cloud services, apps or suppliers that connect to each other, the keys between them can form a chain.

In short

  • Software uses secrets, such as keys and tokens, to prove who it is. Attackers hunt for them.
  • One stolen secret often opens a place that holds more secrets, so the attacker gets further each step.
  • Secrets left in files, scripts and build tools, and old secrets nobody changed, make the chain longer.
  • Keep secrets in a locked store, give each one only the access it needs, and change every secret a leak may have exposed.

What you will learn

  • Explain credential chaining in one sentence.
  • Spot the places where one secret can lead to many more.
  • Check how far one leaked key could reach in your organisation.
  • Ask the right questions after a leak, so the chain is broken.
Software password (secret)
a key, token or password that a program uses to prove who it is.
Locked store for secrets (vault)
a guarded place that hands secrets only to the programs allowed to have them.
How far one key reaches (blast radius)
everything an attacker could touch if that one secret were stolen.

What is credential chaining?

Think of a note pinned by a back door. It gives the code to a small key box. Inside the box hang the keys to every room in the building.

Credential chaining works the same way. A credential is anything that proves who you are, such as a password or a key. Software has credentials too. They are called secrets, and they belong to non-human identities (NHIs) such as apps, service accounts and AI agents.

An attacker who finds one secret uses it to look around. Often they find a settings file, a script or a password store that holds more secrets. Each new secret opens the next door. One small leak becomes a chain.

Where the comparison stops working: a missing key leaves an empty hook you might notice. A copied secret leaves the original in place, so nothing looks wrong until someone checks the records.

Why does it matter?

The first secret an attacker finds is rarely the one that does the most harm. The harm comes from where it leads. A world-wide catalogue of attacker methods lists both hunting for secrets left in files and pulling secrets out of password stores.[2][3]

If you run a small business

What could happen: a supplier's key to your website also opens the place where your payment keys are kept.

Check this: ask each supplier what their key can reach, and whether it can be narrowed.

Next: Least Privilege for Beginners

If you are learning to code

What could happen: a script you wrote holds an admin key, and anyone who reads it gets that power.

Check this: keep keys out of scripts and settings files, and fetch them from a locked store.

Next: Secrets in Code for Beginners

If you manage a team

What could happen: after a supplier breach, your team changes most keys but skips a few "unused" ones.

Check this: after any leak, ask for a list of every secret that may have been exposed, and proof each one was changed.

Next: Leaked Secret Response for Beginners

What does it look like?

Here is a made-up note an investigator might write after tracing a chain inside a small firm.

Example only. All values are made up.

Step 1  Build tool token EXAMPLE-0000 found in a public code page   (1)
Step 2  Token opens the build tool's settings                       (2)
        Settings hold CLOUD_KEY=FAKE-CLOUD-0000                      (3)
Step 3  Cloud key can read the team's password store                 (4)
        Store holds DB_PASSWORD and PAYMENT_KEY for shop.example.com
Step 4  Payment key used from an unknown place at 02:10              (5)
  1. The first link. In a real file, this line would contain a token for the build tool (the service that builds and ships the app).
  2. The token gives more access than it needs: it can read the tool's settings.
  3. In a real file, this line would contain a cloud key stored in plain view inside those settings.
  4. The cloud key can open the store where other secrets live.
  5. The last link. The attacker now holds the keys that matter most.

Why this is risky: each secret on its own looked minor. Together they formed a path from a public page to the payment system.

The safer way: the build token can only start builds, not read settings. The cloud key cannot open the password store. Secrets are short-lived, so a copy taken today is likely to expire before long.[1]

How does it work?

Every chain is different, but the pattern often looks like this.

  1. The first secret. An attacker finds one secret, for example in a code project, a log or a stolen laptop.[1]
  2. A look around. They use it to see what it can reach. Because the secret is valid, their activity can look much like normal software doing its everyday job.
  3. More secrets. They find settings files, scripts or stores that hold other secrets.[2]
  4. Higher access. Some of those secrets carry more power than the first one did, such as an admin key that controls a whole system.
  5. The target. In the end they reach what they came for, such as customer data, payment systems or source code.
Stepping-stone diagram titled How one leaked secret leads to many. Stone 1: a token left in a public code page. Stone 2: the token opens a build tool whose settings hold a cloud key. Stone 3: the cloud key opens a store of secrets holding a database password, a payment key and an admin key. Stone 4: customer data and payments are reached. Green notes under the stones show where the chain can be broken: give each secret only the access it needs, keep secrets out of settings and scripts, use short-lived secrets, and change every secret a leak may have exposed.
Figure 1. Stepping stones: each secret leads to the next, and each step is a chance to break the chain.

Real cases follow this pattern. In late 2022, malware on a CircleCI engineer's laptop stole a signed-in session. CircleCI said the attacker then took customer environment variables, tokens and keys, and it asked customers to change their secrets.[5] See our CircleCI breach page for the full story.

A worked example

Gita Hollis runs a fictional online craft shop with six staff. A software firm looks after the shop's website and its build tool.

One morning the software firm emails. It has been breached, and it lists the keys it held for Gita's shop. It says it has changed them all.

Gita calls Juno Tanaka, a freelance security adviser. Juno thinks of the note by the back door. "Changing the note is good," she says. "But what did the key box hold?"

Juno looks at what the listed keys could reach. One of them could read the shop's cloud settings. Those settings held the password to the customer database and the payment key. Neither was on the firm's list.

So Gita has every secret on that path changed, not just the ones on the list. Juno checks the payment and database records for use from unknown places. She finds no suspicious activity in the records available to her.

Then they shorten the chain. The supplier's key can now only update the website. The payment key moves into a locked store that hands it only to the shop app.

A real case shows why the extra step matters. Cloudflare said four credentials taken in an earlier breach at a supplier were not changed, because staff wrongly believed they were unused. An attacker used them to get into its internal systems.[4] See our Cloudflare breach page.

Myths and mistakes

What people thinkWhat is true
The leaked key only opens one small thing.Check what it can reach. Small keys often lead to places that hold bigger ones.
We changed the leaked key, so we are done.Also change every secret that key could have read, and check the records for misuse.
Old keys nobody uses are harmless.An unused key that still works is an open door. Turn it off or change it.[4]
Secrets in our private settings are safe.Anyone who gets into those settings can read them. Keep secrets in a locked store.
A password store means we cannot be chained.A store helps a great deal, but a key that can read the whole store is a prize. Limit who and what can open it.

What can I do this week?

  • List the keys your suppliers and tools hold, and what each one can reach.
  • Look for secrets saved in settings files, scripts and shared documents, and move them to a locked store.
  • Turn off any key that nobody can name an owner for.
  • Agree a rule: after a leak, change every secret the leaked one could have read, not only the one that leaked.

Checklist

  • Secrets live in a locked store, not in files, scripts or chat messages.
  • Each secret has only the access it needs.
  • Few secrets, if any, can open the whole secrets store.
  • Secrets are short-lived or changed on a regular schedule.
  • Every secret has a named owner, and unused ones are turned off.
  • After a leak, every secret on the possible path is changed.
  • Records show when each secret is used, and someone reviews unusual use.

Common questions

Is credential chaining the same as lateral movement?

They overlap. Lateral movement is an attacker spreading from one computer or account to others. Credential chaining is the trail of secrets that often makes that possible, especially software keys that lead to more keys. See Lateral Movement for Beginners.

Why do attackers want software secrets rather than staff passwords?

Software secrets often work without a second check, such as a code on a phone. They can also carry wide access and stay valid for a long time. That makes them a quiet and useful next step for an attacker.[1]

Does a secrets store stop credential chaining?

It helps a lot, but not on its own. A store keeps secrets out of files, where they are easy to find. You still need to limit which programs can read which secrets, so one stolen key cannot open everything inside.

What should we do first after a key leaks?

Change or turn off the leaked key. Then work out what it could reach, and change any secrets stored there too. Finally, check the records for use from unknown places. See Leaked Secret Response for Beginners.

How do short-lived secrets help?

A short-lived secret is set to expire after a fixed time. So a copy an attacker takes is likely to expire before they can use it for long, which breaks the chain sooner. See Short-Lived Credentials for Beginners.

Where next?

Ready for the detail? Read the practitioner guide: Stolen credential breaches. It goes further into real breaches where one stolen secret led to many, the patterns they share and the controls that would have broken each chain.

Also useful:

Related NHI Mgmt Group resources: Secrets Management Guide · OWASP NHI2: Secret Leakage Guide

Key terms

Credential chaining
Using one stolen credential or access path to unlock another, so a single leak becomes a wider break-in.
Non-human identity (NHI)
A digital identity, or the credential behind it, that represents a machine, application, automated process, service or AI agent, so it can authenticate, carry out tasks and connect to other systems without a person.
Secret
The credential that proves a non-human identity may act, such as an API key, token, password or certificate.
Secrets vault
A central, locked store for secrets that hands them only to the programs allowed to use them.
Blast radius
How much damage could follow if one credential or identity were stolen.
Least privilege
Giving each person, program and system only the access it needs.
Secrets rotation
Replacing secrets on a schedule or after an event, so exposed copies stop working.
Idle secret
A secret that still works even though nothing uses it any more.

Sources and further reading

  1. OWASP Non-Human Identities Top 10, NHI2:2025 Secret Leakage. OWASP Foundation, 2025. https://owasp.org/www-project-non-human-identities-top-10/2025/2-secret-leakage/, accessed 28 Nov 2026.
  2. Unsecured Credentials (T1552). MITRE ATT&CK, Enterprise v20. https://attack.mitre.org/techniques/T1552/, accessed 28 Nov 2026.
  3. Credentials from Password Stores (T1555). MITRE ATT&CK, Enterprise v20. https://attack.mitre.org/techniques/T1555/, accessed 28 Nov 2026.
  4. Thanksgiving 2023 security incident. Cloudflare blog, Cloudflare, 1 February 2024. https://blog.cloudflare.com/thanksgiving-2023-security-incident/, accessed 28 Nov 2026.
  5. CircleCI incident report for January 4, 2023 security incident. CircleCI blog, CircleCI, January 2023. https://circleci.com/blog/jan-4-2023-incident-report/, accessed 28 Nov 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.