Join our Newsletter — 33% off our NHI Course
Authentication, Authorisation & Trust

Token Exfiltration

← Back to Glossary
By NHI Mgmt Group Updated August 28, 2026 Domain: Authentication, Authorisation & Trust

Token exfiltration is the unauthorized removal of access tokens from a client, browser, or application runtime. In SPA environments, it is a major concern because stolen tokens can be replayed against APIs, turning a browser-side compromise into full account or service access.

Expanded Definition

Token exfiltration is not just theft of a credential string. In NHI security, it includes any unauthorized movement of bearer tokens, refresh tokens, session tokens, or API access tokens from a browser, client, extension, container, or application runtime into an attacker-controlled location. Because many tokens are bearer-based, possession alone can be enough to impersonate the original workload or user until expiry or revocation. NIST’s Cybersecurity Framework 2.0 treats this as an identity and access protection problem, while implementation guidance in the NHI domain increasingly focuses on token scope, lifetime, binding, and revocation. Definitions vary across vendors when they blur token exfiltration with generic data leakage, but that is too broad for operational use. In practice, the term should be reserved for scenarios where an attacker can reuse the token to call protected systems, not merely read it. The most common misapplication is calling every exposed secret “token exfiltration,” which occurs when teams fail to distinguish a reusable access token from a non-exploitable value or an encrypted artifact.

Examples and Use Cases

Implementing protections against token exfiltration rigorously often introduces friction in session design, requiring organisations to weigh lower replay risk against extra validation steps, tighter lifetimes, and more complex application flows.

  • A single-page app stores access tokens in browser memory, and a malicious extension reads them before they expire, enabling API replay from a remote host.
  • A CI/CD job injects a cloud access token into environment variables, then prints it in a failed build log that is later copied into a ticketing system.
  • An OAuth authorization flow is intercepted after redirect handling is weakened, and the stolen token is reused to access Salesforce data, similar to the Salesloft OAuth token breach.
  • A developer pastes a refresh token into a chat tool for troubleshooting, and the token remains active long enough to be harvested and replayed, a pattern covered in the Guide to the Secret Sprawl Challenge.
  • An internal admin portal issues long-lived tokens without device binding, making a browser compromise enough to become persistent access rather than a short-lived incident.

For identity transport patterns, RFC 6750 remains relevant because bearer-token replay is the core abuse path, even when the original compromise happens far from the API. NHIMG research shows that 44% of NHI tokens are exposed in the wild, often through collaboration tools and code commits, which makes token exfiltration a realistic day-to-day failure mode rather than an edge case.

Why It Matters in NHI Security

Token exfiltration is high impact because it converts a single foothold into authenticated access across services, tenants, or automation pipelines. Unlike password theft, token theft often bypasses MFA, password rotation, and user awareness entirely. It becomes especially dangerous when tokens are duplicated, reused across applications, or left active after role changes. The 2025 State of NHIs and Secrets in Cybersecurity found that 91% of former employee tokens remain active after offboarding, which means exfiltrated tokens may remain useful long after the original user has left. That same report also found 60% of NHIs are overused, increasing the blast radius when one token is exposed. Organisations need to treat token lifetime, audience restriction, revocation latency, and storage location as governance controls, not just engineering preferences. The same applies when token leakage occurs through AI-assisted tooling, support workflows, or collaboration platforms, as seen in the JetBrains GitHub plugin token exposure and Dropbox Sign breach. Organisations typically encounter the operational cost of token exfiltration only after suspicious API calls, lateral movement, or offboarding failures, at which point the term becomes operationally unavoidable to address.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST Zero Trust (SP 800-207) and NIST SP 800-63 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-02Covers improper secret handling and token exposure in NHI environments.
NIST CSF 2.0PR.AAIdentity assurance and access control both fail when tokens are stolen and replayed.
NIST Zero Trust (SP 800-207)SCFZero trust assumes credentials can be compromised and must be continuously revalidated.
NIST SP 800-63Digital identity guidance informs how assurance changes when an authenticator is replayable.
OWASP Agentic AI Top 10A5Agentic systems often leak tokens through tool execution, memory, or prompt-visible outputs.

Use stronger authentication and binding controls where token theft would enable account takeover.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on August 28, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org