Article

NHI2 2025: Secret Leakage – Understanding and Mitigating the Risks

NHI2 Secret Leakage: Exposed API keys and credentials threaten your business. Learn how to prevent unauthorized access, data breaches, and system disruption.

In today's rapidly evolving digital landscape, non-human identities (NHIs) have become indispensable for enterprise operations. These digital credentials, used by machines, applications, and automated processes, support cloud operations and AI-driven tasks. However, this reliance on NHIs introduces significant security challenges, making Secret Leakage a critical risk.

What is Secret Leakage?

Secret Leakage (NHI2:2025) refers to the exposure of sensitive NHIs to unauthorized data stores during the software development lifecycle. These NHIs include API keys, tokens, encryption keys, and certificates, all essential for secure authentication and access within IT systems. The OWASP Foundation identifies Secret Leakage as a primary concern when integrating NHIs into development processes.

How Does Secret Leakage Occur?

Secret Leakage happens when sensitive credentials are unintentionally exposed through various channels:

  • Hard-coding into source code: Developers may embed API keys or passwords directly into the code, making them easily accessible.
  • Storage in plain text configuration files: Saving sensitive information in unprotected configuration files exposes credentials to anyone with access.
  • Sharing over public chat applications: Transmitting secrets via unsecured communication channels increases the risk of interception.
  • Embedding in source code, sharing in developer forums, or leaving in publicly accessible repositories: Broader exposure through public platforms amplifies the chances of discovery by malicious actors.

Why is Secret Leakage a Major Security Risk?

The consequences of Secret Leakage can be severe:

  • Unauthorized Access: Leaked credentials allow attackers to bypass security measures and gain unauthorized access to critical systems and data.
  • Privilege Escalation: Attackers can use compromised NHIs to escalate their privileges, granting them greater control over the network.
  • Lateral Movement: Once inside the system, attackers can move laterally, accessing other systems and data.
  • Data Exfiltration: Sensitive data can be stolen and exfiltrated, leading to financial losses and reputational damage.
  • System Disruption: Critical operations can be disrupted, causing downtime and affecting business continuity.

Real-World Examples

Several high-profile breaches have highlighted the dangers of Secret Leakage, including:

  • Cloudflare: Attackers exploited gaps in Cloudflare's inventory of non-human identities by using credentials compromised in a previous Okta breach. They accessed Cloudflare's Atlassian environment using a missed access token and three service accounts.
  • AWS: A cyberattack exploited misconfigured environment variable files (.env files) to extract over 90,000 unique credentials, including AWS IAM access keys.
  • Hugging Face: Attackers gained unauthorized access to API tokens and secrets used by users to manage AI applications and datasets on Hugging Face's Spaces platform.
  • Microsoft Exchange Online: A breach compromised mailboxes by exploiting authentication tokens associated with a Microsoft key established in 2016, giving attackers access to sensitive information and systems.
  • Dropbox: A threat actor compromised a service account in an automated system configuration tool, accessing sensitive customer information.

These incidents underscore the importance of proactive measures to prevent Secret Leakage.

Prevention and Mitigation Strategies

To defend against Secret Leakage, organizations should adopt a multi-faceted approach:

  • Implement Robust Scanning Tools:
    • Use commercial tools like Cremit to scan for exposed secrets across the entire tech stack. Cremit can detect secrets in source code, hidden content, deleted code, and version history.
    • Employ static code analysis tools to identify hardcoded credentials and other vulnerabilities before deployment.
  • Enforce Secure Development Practices:
    • Avoid hard-coding credentials: Use environment variables or secure vaults to store sensitive information.
    • Secure configuration files: Protect configuration files with appropriate permissions and encryption.
    • Use secure communication channels: Transmit secrets only through encrypted channels.
  • Adopt an "Assume Leak" Mindset:
    • Operate under the assumption that NHIs have already been exposed.
    • Implement continuous monitoring and behavioral analytics to detect suspicious activities.
    • Establish processes for swiftly revoking compromised NHIs and containing potential damage.
  • Implement Zero Trust Principles:
    • Verify every identity: Continuously monitor and validate every NHI access request to ensure legitimacy.
    • Enforce least privilege: Grant NHIs only the minimum necessary access permissions.
    • Use short-lived tokens: Employ short-lived, signed tokens (e.g., OAuth 2.0) instead of long-lived static credentials.
    • Context-based validation: Ensure NHIs are accessing resources only from known environments.
  • Automate NHI Lifecycle Management:
    • Provisioning: Securely create and assign unique credentials to NHIs with appropriate privileges and governance.
    • Rotation: Regularly update credentials to minimize the risk of unauthorized access.
    • Deprovisioning: Deactivate and remove unused NHIs to reduce the attack surface.
  • Strengthen NHI Security Posture:
    • Conduct posture assessments: Evaluate secret rotation, access permissions, and compliance with security policies.
    • Prioritize remediation: Address over-privileged accounts and unrotated secrets.
  • Ensure Comprehensive Visibility and Context:
    • Maintain a centralized view of all NHIs across all environments.
    • Understand each NHI’s origin, ownership, storage, usage patterns, and permissions.
    • Use tools like Cremit’s NHI Traceability to map NHI origins and associated risks.

Cremit NHI Security Platform for NHI Protection

Cremit  offers a comprehensive platform to secure NHIs and mitigate the risk of Secret Leakage:

  • Complete Visibility Across NHIs: Cremit provides a unified view of all NHIs across cloud platforms, SaaS applications, CI/CD pipelines, code repositories, and on-prem systems.
  • Real-Time Threat Detection and Response: The platform continuously monitors NHI activity, flags anomalies, and provides real-time alerts for suspicious behavior, enabling immediate threat containment.
  • Zero Trust Architecture: Cremit ensures continuous validation of every NHI interaction, minimizing the risk of unauthorized access.
  • Automated Identity Governance: Cremit streamlines lifecycle management, enforcing least-privilege access and ensuring timely removal of obsolete identities.
  • Compliance and Audit-Ready Reporting: The platform supports governance, risk management, and audit logs with comprehensive reporting and automated compliance checks.

The Importance of a Proactive Approach

Secret Leakage poses a significant threat to organizations of all sizes. By adopting a proactive approach and leveraging the right tools, enterprises can effectively mitigate the risks associated with Secret Leakage and ensure a more secure and resilient digital environment. Start now or book a demo!

Unlock AI-Driven Insights to Master Non-Human Identity Risk.

Go beyond basic data; unlock the actionable AI-driven insights needed to proactively master and mitigate non-human identity risk

A dark-themed cybersecurity dashboard from Cremit showing non-human identity (NHI) data analysis. Key metrics include “Detected Secrets” (27 new) and “Found Sensitive Data” (58 new) from Jan 16–24, 2024. Two donut charts break down source types of detected secrets and sensitive data by platform: GitHub (15k), GetResponse (1,352), and Atera (352), totaling 16.9k. The dashboard includes a line graph showing trends in sensitive data over time, and bar charts showing the top 10 reasons for sensitive data detection—most prominently email addresses and various key types (API, RSA, PGP, SSH).

Blog

Explore more news & updates

Stay informed on the latest cyber threats and security trends shaping our industry.

OWASP NHI5:2025 Insecure Authorization Deep Dive
Explore OWASP NHI5: Insecure Authorization. See how Non-Human Identities gain excess privileges, causing breaches. Learn countermeasures like Zero Trust & least privilege.
OWASP NHI4:2025 Insecure Authentication Deep Dive Introduction: The Era of Non-Human Identities Beyond Humans
Deep dive into OWASP NHI4: Insecure Authentication. Understand the risks of NHIs, key vulnerabilities, and how Zero Trust helps protect your systems.
Secret Sprawl and Non-Human Identities: The Growing Security Challenge
Discover NHI sprawl vulnerabilities and how Cremit's detection tools safeguard your organization from credential exposure. Learn to manage NHI risks.
Navigating the Expanding AI Universe: Deepening Our Understanding of MCP, A2A, and the Imperative of Non-Human Identity Security
Delve into AI protocols MCP & A2A, their potential security risks for AI agents, and the increasing importance of securing Non-Human Identities (NHIs).
Stop Secrets Sprawl: Shifting Left for Effective Secret Detection
Leaked secrets threaten fast-paced development. Learn how Shift Left security integrates early secret detection in DevOps to prevent breaches & cut costs.
Hidden Dangers: Why Detecting Secrets in S3 Buckets is Critical
Learn critical strategies for detecting secrets in S3 buckets. Understand the risks of exposed NHI credentials & why proactive scanning is essential.
NHI2 2025: Secret Leakage – Understanding and Mitigating the Risks
NHI2 Secret Leakage: Exposed API keys and credentials threaten your business. Learn how to prevent unauthorized access, data breaches, and system disruption.
Stop the Sprawl: Introducing Cremit’s AWS S3 Non-Human Identity Detection
Cremit Launches AWS S3 Non-Human Identity (NHI) Detection to Boost Cloud Security
Human vs. Non-Human Identity: The Key Differentiators
Explore the critical differences between human and non-human digital identities, revealing hidden security risks and the importance of secret detection.
Wake-Up Call: tj-actions/changed-files Compromised NHIs
Learn from the tj-actions/changed-files compromise: CI/CD non-human identity (NHI) security risks, secret theft, and proactive hardening.
NHI 3 2025: 3rd Party Supply Chain Dangers
Discover the security risks of vulnerable third-party non-human identities (NHI3:2025) and learn effective strategies to protect your organization from this OWASP Top 10 threat.
Build vs. Buy: Making the Right Choice for Secrets Detection
Build vs. buy secrets detection: our expert guide compares costs, features, and ROI for in-house and commercial security platforms.
Bybit Hack Analysis: Strengthening Crypto Exchange Security
Bybit hacked! $1.4B crypto currency stolen! Exploited Safe{Wallet}, API key leak, AWS S3 breach? Exchange security is at stake! Check your security now!
Rising Data Breach Costs: Secret Detection's Role
Learn about the growing financial impact of data breaches and how secret detection and cybersecurity strategies can safeguard your data and business.
NHI1 2025: Improper Offboarding- A Comprehensive Overview
Discover how improper offboarding exposes credentials, leading to vulnerabilities like NHI sprawl, attack surface expansion, and compliance risks.
Behind the Code: Best Practices for Identifying Hidden Secrets
Improve code security with expert secret detection methods. Learn strategies to safeguard API keys, tokens, and certificates within your expanding cloud infrastructure.
Understanding the OWASP Non-Human Identities (NHI) Top 10 Threats
Understanding NHI OWASP Top 10: risks to non-human identities like APIs and keys. Covers weak authentication, insecure storage, and more.
Securing Your Software Pipeline: The Role of Secret Detection
Prevent secret leaks in your software pipeline. Discover how secret detection improves security, safeguards CI/CD, and prevents credential exposure.
What Is Secret Detection? A Beginner’s Guide
Cloud security demands secret detection. Learn its meaning and why it's essential for protecting sensitive data in today's cloud-driven organizations.
Full Version of Nebula – UI, New Features, and More!
Explore the features in Nebula’s full version, including a refined UI/UX, fine-grained access control, audit logs, and scalable plans for teams of all sizes.
Unveiling Nebula: An Open-Source MA-ABE Secrets Vault
Nebula is an open-source MA-ABE secrets vault offering granular access control, enhanced security, and secret management for developers and teams.
Vigilant Ally: Helping Developers Secure GitHub Secrets
The Vigilant Ally Initiative supports developers secure API keys, tokens, and credentials on GitHub, promoting secure coding and secrets management.
Cremit Joins AWS SaaS Spotlight Program
Cremit joins the AWS SaaS Spotlight Program to gain insights through mentorship and collaboration, driving innovation in AI-powered security solutions.
DevSecOps: Why start with Cremit
DevSecOps is security into development, improving safety with early vulnerability detection, remediation, and compliance, starting with credential checks.
Credential Leakage Risks Hiding in Frontend Code
Learn why credentials like API keys and tokens are critical for access control and the risks of exposure to secure your applications and systems effectively.
Introducing Probe! Cremit's New Detection Engine
Probe detects exposed credentials and sensitive data across cloud tools, automating validation and alerts, with AI-powered scanning for enhanced security.
Customer Interview: Insights from ENlighten
We interviewed Jinseok Yeo from ENlighten, Korea’s top energy IT platform, on how they secure credentials and secrets. Here’s their approach to security.
6 Essential Practices for Protecting Non-Human Identities
Safeguard your infrastructure: Learn 6 best practices to protect API keys, passwords & encryption keys with secure storage, access controls & rotation.
Microsoft Secrets Leak: A Cybersecurity Wake-Up Call
See how an employee error at Microsoft led to the exposure of sensitive secrets and 38 terabytes of data.