# HCSEC-2026-32 - Vault Vulnerable to Privilege Escalation via Slash Injection in Templated Policy Paths

**URL:** <https://discuss.hashicorp.com/t/hcsec-2026-32-vault-vulnerable-to-privilege-escalation-via-slash-injection-in-templated-policy-paths/77678>\
**Category:** Security\
**Tags:** security-vault\
**Created:** [August 24, 2026, 8:40pm UTC](https://discuss.hashicorp.com/t/hcsec-2026-32-vault-vulnerable-to-privilege-escalation-via-slash-injection-in-templated-policy-paths/77678 "2026-08-24T20:40:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark.collao](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/mark.collao/32/23944_2.png) [@mark.collao](https://discuss.hashicorp.com/u/mark.collao)\
**Post date:** [August 24, 2026, 8:40pm UTC](https://discuss.hashicorp.com/t/hcsec-2026-32-vault-vulnerable-to-privilege-escalation-via-slash-injection-in-templated-policy-paths/77678/1 "2026-08-24T20:40:55Z")

</div>

**Bulletin ID:** HCSEC-2026-32  
**Affected Products / Versions:**  
Vault Community Edition from 0.11.0 up to 2.0.3; fixed in 2.0.4.

Vault Enterprise from 0.11.0 up to 2.0.3, 1.21.8, 1.20.13, and 1.19.19; fixed in 2.0.4, 1.21.9, 1.20.14, and 1.19.20.  
**Publication Date:** August 24, 2026

**Summary**  
A vulnerability was identified in HashiCorp Vault and Vault Enterprise (“Vault”) such that an authenticated attacker may manipulate an identity value referenced by a templated policy path to gain unintended access to Vault paths.

An attacker who can control the referenced identity value may include slash (/) characters that Vault interprets as additional path segments when rendering the policy.

This vulnerability, CVE-2026-5006, was fixed in Vault Community Edition 2.0.4 and Vault Enterprise 2.0.4, 1.21.9, 1.20.14, and 1.19.20.

**Background**  
Vault policies define the capabilities granted to clients for specific paths. Vault supports identity templating in policy paths, allowing policies to incorporate identity values associated with entities, aliases, and groups.

Identity templates may reference values such as names, metadata, and custom metadata. Vault renders these values when constructing the policies that apply to a token.

**Details**  
An attacker who can control an identity value referenced by an applicable templated policy may include / characters in that value. Vault interprets the inserted characters as path separators, potentially causing the rendered policy rule to grant capabilities on a path that the policy author did not intend. For example,

```auto
path "kv/data/{{identity.entity.metadata.department}}" {
    capabilities = ["read"]
}

```

If the referenced department value is admin/super-secret, the policy renders as:

```auto
path "kv/data/admin/super-secret" {
    capabilities = ["read"]`
}

```

This may allow the attacker to read the rendered path even if the policy author intended department to represent only one path segment.

**Remediation**

Customers should evaluate their exposure to this issue and consider upgrading to Vault Community Edition 2.0.4 or Vault Enterprise 2.0.4, 1.21.9, 1.20.14, or 1.19.20.

After upgrading, operators should set [deny\_slash\_in\_templated\_paths](https://developer.hashicorp.com/vault/docs/configuration#deny_slash_in_templated_paths) to true in the Vault server configuration on every Vault server:

```auto
deny_slash_in_templated_paths = true

```

Alternatively, operators may set the corresponding environment variable:

```auto
VAULT_DENY_SLASH_IN_TEMPLATED_PATHS=true

```

Each Vault server must be restarted after applying the configuration.

The deny\_slash\_in\_templated\_paths option defaults to false. When enabled, Vault prevents a policy rule from granting capabilities if an identity template in its path renders a value containing /.

Operators should review existing [templated policies](https://developer.hashicorp.com/vault/docs/concepts/policies#templated-policies) and identity values for compatibility before enabling the option. Refer to the [Vault production hardening guidance](https://developer.hashicorp.com/vault/docs/concepts/production-hardening) for additional recommendations.

**Acknowledgement**  
This issue was reported to HashiCorp by Lior Moshe, Uri Rolls, and Daniel Peters of Operating Intelligence ([opint.ai](http://opint.ai/ "http://opint.ai/"))

_We deeply appreciate any effort to coordinate disclosure of security vulnerabilities. For information about security at HashiCorp and the reporting of security vulnerabilities, please see [https://hashicorp.com/security](https://hashicorp.com/security)._
