AWS and Cloudanix team co-authored this blog: Real-Time Threat and Anomaly Detection for Workloads on AWS

What Are Orphaned Credentials? Stale Keys, Accounts, and Forgotten Access

Orphaned credentials are keys, accounts and roles that outlived their owner or purpose. Learn why they cause breaches, how to find them and how to prevent them.

Orphaned credentials are logins, keys, tokens, accounts or roles that still work after the person, project or system they were created for is gone. The owner left the company, the contractor finished the job, the pilot ended, the application was retired, but the access was never removed. Nobody uses it, and in many cases nobody remembers it exists. It still opens the door.

They are also called stale credentials, dormant accounts, zombie access or ghost accounts, depending on the tool and the context. The details differ, and the core problem is the same: access without an owner. An access path that no one is watching is exactly what an attacker wants, because no one will notice it being used.

This page explains how credentials become orphaned, why they are so dangerous, a recent real-world case, how to find them across cloud accounts and SaaS tools, and how to stop creating new ones.

How credentials become orphaned

  • People change roles or leave. Offboarding removes the main account and misses the access keys, shared accounts, SaaS logins and personal tokens the person created.
  • Projects end. A contractor or vendor is given a key for a project. The project ends and the key stays. Nobody owns the cleanup.
  • Applications are retired. The service is decommissioned, and its service account, database user and secrets remain.
  • Temporary access becomes permanent. Access is granted “for a quick fix” and never expires. See zero standing privilege.
  • Mergers and migrations. Accounts from acquired companies and old systems come across with no review.
  • Credentials are copied. A key is pasted into a script, a chat or a configuration file. Even if the original is revoked, copies elsewhere may still work, and if it is not revoked, the copies keep it alive.
  • No single owner. The identity was created by a team that no longer exists, or by automation, with no record of why.

Why they are dangerous

  1. They are valid. An orphaned key is not a vulnerability. It is a working credential. Nothing needs to be exploited.
  2. Nobody is watching. A live account is monitored by its owner, who notices strange activity. An orphaned one has no owner to notice.
  3. They often carry broad access. They were created for a purpose that needed access, and rarely re-scoped after.
  4. They are easy to steal. Old keys sit in repositories, laptop backups, wikis and former vendors’ systems.
  5. They look normal. Use of an old but valid key may not trigger alerts tuned to detect new, unusual accounts.
  6. They are quickly found by automation. AI-assisted tools scan public repositories for secrets and try what they find. See AI agents scanning GitHub for secrets.

A recent case: the key that was never retired

On November 16, 2026, Barracuda described how an attacker got into its cloud environment. The company said it had given a cloud access key to an outside AI vendor for a past project, and that it did not retire the key when the vendor finished. Barracuda believes the attacker stole the key from a configuration file in the vendor’s GitHub repository in October, then used it between November 1 and 2 to access about ten of the company’s cloud accounts over 44 hours.

The key had no active purpose. It belonged to a finished project. It was nonetheless a valid way into production. We analyze the incident in Barracuda’s cloud breach and the vendor key nobody retired.

Types of orphaned credentials

TypeExampleTypical risk
Departed-user accountsA former employee’s cloud, source control or SaaS loginAccount takeover, or use by the former user
Unused access keysAn IAM access key unused for monthsTheft from old repositories or backups
Vendor and contractor accessA third party’s login or key after the engagement endedCompromise of the vendor extends to you. See third-party risk.
Service accounts and service principalsAn account for a retired application. See service principals.Over-broad machine access that nobody reviews
Cross-account trustA role that still trusts an account you no longer work withOutsider can assume a role
Shared and default credentialsA shared admin password nobody can attributeNo accountability
Tokens and secrets in codeAn API key in a repository or CI variableFound by scanners. See secrets sprawl.
Long-lived AI and automation credentialsAn agent or pipeline key that outlived its useA growing category. See non-human identities.

How to find them

Cloud access keys and users (AWS)

# Credential report: every user, key, age and last use
aws iam generate-credential-report
aws iam get-credential-report --query Content --output text | base64 -d \
  | cut -d, -f1,4,5,9,10,11,14,15,16

# When was a specific key last used?
aws iam get-access-key-last-used --access-key-id AKIAEXAMPLEKEYID

# Roles that have not been used recently
aws iam list-roles --query 'Roles[].RoleName' --output text | tr '\t' '\n' | while read r; do
  echo "$r $(aws iam get-role --role-name "$r" --query 'Role.RoleLastUsed.LastUsedDate' --output text)"
done

Look for keys older than 90 days, keys with no recent use, users that have not signed in for months, and roles with no last-used date. AWS documents the lifecycle in its guidance on access keys.

Google Cloud

gcloud iam service-accounts list --format="value(email)" | while read sa; do
  echo "== $sa"
  gcloud iam service-accounts keys list --iam-account="$sa" --managed-by=user
done

User-managed service account keys are the usual orphans.

Identity provider and SaaS

Export users, last sign-in dates, group memberships and application assignments from your identity provider. Compare against the HR system of record. Accounts with no matching active employee or sign-ins for months are candidates. For OAuth applications and integrations, list every third-party app with access and check who approved it.

Repositories and logs

Scan code and history for credentials with tools such as gitleaks or trufflehog, and scan logs and exports before sharing them. See how to stop secrets leaking in git.

Third parties

Keep a register of every vendor and contractor with access, with owner, scope and end date. Anything without an end date is a candidate.

How to clean up safely

  1. Assign an owner to every identity. If no one claims it, it is a candidate for removal.
  2. Disable before deleting. Deactivate the key or account, wait a defined period, watch for breakage, then delete. A deactivated key can be turned back on.
  3. Rotate what you cannot remove. If a credential is needed but its history is unknown, replace it. See secret rotation.
  4. Clean up trust relationships. Remove cross-account trust for accounts you no longer deal with.
  5. Check for copies. After revoking a key, search for where else it was used.
  6. Record the change. Note what was removed, when and why, for your audit trail.
# Deactivate first (reversible)
aws iam update-access-key --user-name USER --access-key-id AKIAEXAMPLEKEYID --status Inactive
# After a quiet period, delete
aws iam delete-access-key --user-name USER --access-key-id AKIAEXAMPLEKEYID

How to stop creating them

Cleanup without prevention is a treadmill.

  • Give every access an end date at creation. Contracts, onboarding forms and tickets should carry it. Renewal needs a reason.
  • Automate offboarding. Connect HR events to identity and access removal, including SaaS apps and cloud accounts.
  • Prefer short-lived credentials. Roles and tokens that expire in hours cannot be orphaned for long. Prefer these to long-lived keys.
  • Use just-in-time access for people and third parties. Access that is requested for a reason and expires by itself cannot sit unused. See just-in-time access.
  • Review regularly, with data. Reviews should show last-used dates and let the reviewer remove access with one action.
  • Alert on dormant identities waking up. An old key that is suddenly active is a strong signal. See cloud UEBA.
  • Apply least privilege so any orphan that remains can do little.

How Cloudanix helps

Cloudanix finds orphaned access and stops new standing access from forming.

  • Finding them. Non-human identity visibility and CIEM list service accounts, keys, roles and users across AWS, Azure and GCP, flag the stale and over-permissioned ones, and show what each could reach. Findings are ranked by exposure, environment, data and identity with contextual severity, so the forgotten production key ranks above the forgotten test one. See CIEM for multi-account AWS.
  • Preventing them. Cloud JIT replaces standing human and third-party access to AWS, Azure and GCP with a request, approve, time-boxed grant, auto-revoke lifecycle. Database JIT, VM JIT and Kubernetes JIT do the same for databases, servers and clusters. Agentic JIT and Coding Agent JIT give pipelines and AI agents credentials that last for a task. Access ends by itself, so there is nothing to forget. See contractor access and third-party access with JIT.
  • Showing the proof. Every request, approval, session and revocation is logged with the real person’s identity to storage you own.
  • Catching repository leaks. Code Security scans pull requests and full git history for hardcoded credentials, and can fail a pull request that introduces one.

The limit: Cloudanix cannot see or revoke a key it was never connected to, and it cannot scan a vendor’s own repository. Long-lived credentials that already exist outside JIT need to be found, rotated and replaced.

Further reading

Frequently asked questions

What are orphaned credentials?

They are logins, keys, accounts or roles that still work after the person, project or system they were created for is gone, and which nobody owns or monitors.

What is the difference between orphaned and stale credentials?

The terms overlap. “Stale” usually means not used or not rotated for a long time. “Orphaned” means there is no owner. A credential can be one without being the other, and both are risks.

How do orphaned credentials lead to breaches?

They are valid and unmonitored, so an attacker who finds one can use it without exploiting anything and with little chance of being noticed. Barracuda’s reported incident began with a vendor key that was never retired.

How often should I review access for orphaned credentials?

Continuously where you can automate it, and at least quarterly for privileged and third-party access. Review with last-used data, not names alone.

How does just-in-time access help?

It gives access an end date by default. Access that is requested for a reason and revoked automatically cannot become orphaned.

People Also Read

What Our Users Are Saying

Customer Reviews

Cloudanix is trusted by security leaders worldwide to deliver proactive, reliable, and cutting-edge cloud security.

One day, I changed the password of a root account, and my CTO called me within less than a minute to confirm if I did so. I was not expecting a reaction this quick. He told me Cloudanix alerted him of this password change and that he wanted to confirm as it was a critical security notification. I couldn't believe it!

Ritesh Agarwal
Ritesh Agarwal
CEO, Airgap Networks

Compliance is one way of staying secure, but what I want is the ability to go deeper and attain 'true security.' Cloudanix provides us the capability to do so.

Vishal Madan
Vishal Madan
Head of Engineering, iMocha

Cloudanix is building for the future of the cloud, which makes the product all the more desirable.

Ritesh Agarwal
Ritesh Agarwal
CEO, Airgap Networks

Cloudanix gave us the visibility we were missing. Being able to move from permanent access to a robust Just-In-Time (JIT) workflow has fundamentally changed our security posture without slowing down our engineering velocity.

Pavan Kumar Lekkala
Pavan Kumar Lekkala
SRE Lead, HugoHub

We are excited to leverage Cloudanix's comprehensive multi-cloud DevSecOps solution to secure our production workloads on AWS. Cloudanix has demonstrated that it can solve many challenges that DevSecOps teams face while continually adding new features such as SOC2 compliance and drift detection.

Satish Mohan
Satish Mohan
Co-founder & CTO, Airgap Networks

Managing third-party partner access was once a major concern for our security posture. With Cloudanix JIT Cloud, we've effectively achieved zero third-party risk. We can now grant access confidently, knowing that it is temporary, audited, and automatically revoked, resulting in a 100% reduction in our privileged access exposure.

Okesh Badhiye
Okesh Badhiye
Head of Technical Engineering, Finfinity

The snooze feature and responsible alerts have helped us save time and prioritize what to tackle first.

Satish Mohan
Satish Mohan
Co-founder & CTO, Airgap Networks

Implementing Cloudanix JIT internally allowed us to practice what we preach. By eliminating permanent access to our own clouds and databases, we've neutralized the risk of standing privileges, ensuring our own 'keys to the kingdom' are never left exposed.

Girish Manghnani
Girish Manghnani
Managing Partner, Tech Inspira

The problem with permissions is a lot of times, the gaps are left open due to oversights from inside the organization itself. With Cloudanix's CIEM, we get a complete view of user permissions and access. This enables us to update the permissions, reducing the attack surface.

Nilesh Pethani
Nilesh Pethani
Application Architect, iMocha

In the world of Fintech, trust is our currency. Cloudanix provided the frictionless visibility we needed to secure our EKS workloads across AWS, ensuring we stay audit-ready for SOC2 and GDPR without slowing down our engineering velocity.

Amol Naik
Amol Naik
Head of Security & Infrastructure, HugoHub

Cloudanix delivered value within 5 minutes of onboarding. Continuous monitoring, timely detection, and excellent documentation helped us attain a great cloud security posture.

Divyanshu Shukla
Senior DevSecOps, Meesho

Technology strategies and business strategies are in a state of constant change which includes centralization and decentralization of responsibilities. Regardless of strategic shift, we still have intellectual property to protect. Cloudanix are critical partners for us in our public cloud security posture across our three cloud providers.

Jerry Locke
Jerry Locke
Senior Director Global Solutions Engineering, Eversana

Cloudanix has been amazing. They opened up a common Slack channel with us — and it feels like we are talking to our own team and getting things done with Cloud security. The support team is always available, friendly, helpful, and ready to go out of their way.

Satish Mohan
Satish Mohan
CTO, Airgap Networks

Beyond just access management, Cloudanix CSPM has given us a unified view of our AWS environment. The real-time alerting and anomaly detection allow us to prevent any untoward activity before it happens, which is critical for a marketplace connecting 50+ financial institutions.

Okesh Badhiye
Okesh Badhiye
Head of Technical Engineering, Finfinity

For a Fintech company, data is our most valuable — and most sensitive — asset. Cloudanix DAM hasn't just improved our visibility; it has given us control. The ability to mask data and prevent unauthorized queries in real-time is a game-changer for our compliance and customer trust.

Jiten Gala
Jiten Gala
President Engineering and Product, Kapittx

Our clients, especially in the Middle East financial sector, demand absolute accountability. Cloudanix JIT Cloud has been a competitive differentiator for us, allowing us to provide secure, governed access to customer accounts that meet their strictest audit and compliance requirements.

Girish Manghnani
Girish Manghnani
Managing Partner, Tech Inspira

Cloudanix is always on my team's lips because of its exceptional support. Be it a small or big query, Cloudanix has gone above and beyond to resolve them. This one's a keeper for us.

Sujit Karpe
Sujit Karpe
CTO, iMocha

For a long-lasting partnership, great support goes a long way. Cloudanix has delivered exceptional support whenever required. Their edge is their team is always ready to go beyond to solve any issues that we have. This speaks volumes about the culture at Cloudanix.

Akash Maheshwari
Akash Maheshwari
Co-founder, MoveInSync

Beyond the technology, Cloudanix feels like an extension of our own team. Their willingness to stand up a dedicated Middle East tenant for us and provide exceptional support at a sensible price makes them a long-term partner for Hugosave.

Surya Tamada
Surya Tamada
CTO, HugoHub

The real-time notifications that Cloudanix provides are a real lifesaver. Their adaptive notifications ensure that my team stays productive and doesn't get interrupted all the time.

Digvijay Singh
Staff Security Engineer, Meesho

The whole point in technological evolution is to help improve the world we live in. We must protect that and to do so requires an effective and efficient security strategy. The Cloudanix team helped make our public cloud security posture management strategy a reality. The symbiotic relationship we have allows for a continuous feedback loop which is how business should operate.

Larry Wheat
Larry Wheat
Staff Solutions Engineer, Eversana

Ready to see your graph?

Connect a cloud account in under 30 minutes. See every finding rooted in identity, asset, and blast radius — with a fix path attached.

Book a Demo