CVE-2026-5006 Overview
CVE-2026-5006 is an authorization bypass vulnerability in HashiCorp Vault and Vault Enterprise. An authenticated attacker can manipulate an identity value referenced by a templated policy path to reach Vault paths outside their intended scope. The flaw stems from Vault interpreting slash (/) characters embedded in identity values as additional path segments during policy rendering. This behavior effectively expands the attacker's granted policy scope beyond what administrators defined. HashiCorp addressed the issue in Vault Community Edition 2.0.4 and Vault Enterprise 2.0.4, 1.21.9, 1.20.14, and 1.19.20. The vulnerability is classified under [CWE-639: Authorization Bypass Through User-Controlled Key].
Critical Impact
Authenticated users can escalate privileges and access secrets or Vault paths they were not authorized to reach, undermining tenant isolation in templated ACL policies.
Affected Products
- HashiCorp Vault Community Edition prior to 2.0.4
- HashiCorp Vault Enterprise prior to 2.0.4, 1.21.9, 1.20.14, and 1.19.20
- Vault deployments using templated ACL policies that reference user-controlled identity metadata
Discovery Timeline
- 2026-08-24 - CVE-2026-5006 published to NVD
- 2026-08-26 - Last updated in NVD database
Technical Details for CVE-2026-5006
Vulnerability Analysis
HashiCorp Vault supports templated ACL policies that reference identity attributes such as entity IDs, aliases, and metadata. Administrators embed placeholders like {{identity.entity.metadata.team}} inside policy path definitions. Vault resolves these placeholders at request time and evaluates the rendered path against ACL rules.
CVE-2026-5006 exists because Vault does not sanitize slash characters within the substituted identity values. When an attacker controls an identity attribute and injects / characters, Vault treats the injected content as additional path segments. The rendered policy therefore grants access to paths the administrator never intended to authorize.
Exploitation requires authenticated access with the ability to influence a referenced identity value, for example through self-service metadata updates or alias creation flows. The attack vector is network-based with high attack complexity, reflecting the need to identify a templated policy and a writable identity attribute that feeds it.
Root Cause
The root cause is insufficient input validation during policy template rendering. Vault concatenates user-controlled identity values directly into policy paths without escaping or rejecting path separators. This design assumes identity values are opaque tokens, an assumption that fails when identities can hold arbitrary strings supplied by users or upstream identity providers.
Attack Vector
An authenticated attacker first identifies a templated policy that expands an identity attribute into a path segment. The attacker then sets the referenced identity value to a string containing slash characters, such as team-a/../team-b. When Vault renders the policy, the injected slashes produce path segments that match ACL rules for other tenants or higher-privilege paths. Requests routed through the rendered policy succeed against secrets outside the attacker's original scope. See the HashiCorp Security Advisory HCSEC-2026-32 for vendor-authored technical detail.
Detection Methods for CVE-2026-5006
Indicators of Compromise
- Identity entity or alias metadata values containing / characters, particularly in fields referenced by templated policies
- Audit log entries showing successful reads or writes against paths that do not match a user's expected tenant or namespace prefix
- Unexpected update operations against identity/entity/id/* or identity/entity-alias/id/* endpoints preceding cross-tenant access
Detection Strategies
- Parse Vault audit logs and flag any identity metadata write where values contain path separators or traversal sequences
- Correlate identity attribute changes with subsequent secret access on paths outside the actor's normal namespace
- Enumerate all ACL policies and inventory templated placeholders, then monitor the source identity fields for those placeholders
Monitoring Recommendations
- Enable Vault audit devices on all requests and forward logs to a centralized analytics platform for retention and query
- Alert on anomalous privilege patterns where a low-privilege token successfully accesses secrets across multiple tenant paths
- Review identity provider synchronization jobs that populate Vault entity metadata for injection of untrusted values
How to Mitigate CVE-2026-5006
Immediate Actions Required
- Upgrade to Vault Community Edition 2.0.4 or Vault Enterprise 2.0.4, 1.21.9, 1.20.14, or 1.19.20
- Audit all templated ACL policies for identity attributes that users or upstream systems can control
- Rotate any secrets that may have been exposed through cross-tenant access prior to patching
Patch Information
HashiCorp released fixed builds for Vault Community Edition 2.0.4 and Vault Enterprise versions 2.0.4, 1.21.9, 1.20.14, and 1.19.20. Refer to the HashiCorp Security Advisory HCSEC-2026-32 for release notes and download links.
Workarounds
- Restrict write access to identity entity and alias metadata so end users cannot modify values referenced by templated policies
- Sanitize identity attributes at ingestion, rejecting values that contain / or other path separators
- Replace templated policy paths with static, per-tenant policies where feasible until the patch is deployed
# Configuration example: restrict metadata updates and validate identity values
# 1) Deny end-user writes to entity metadata via a restrictive policy
path "identity/entity/id/*" {
capabilities = ["deny"]
}
path "identity/entity-alias/id/*" {
capabilities = ["deny"]
}
# 2) Upgrade Vault to a fixed release
vault version
# Expected: Vault v2.0.4 (or 1.21.9 / 1.20.14 / 1.19.20 for Enterprise)
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

