CVE-2026-5006

Description

A flaw was found in HashiCorp Vault. An authenticated attacker can manipulate identity values in templated policy paths by injecting slash characters. This manipulation allows Vault to misinterpret policy paths, leading to unintended access to Vault resources and potential privilege escalation.

Statement

A privilege escalation vulnerability was found in HashiCorp Vault and Vault Enterprise. In versions 0.11.0 through 2.0.3 (and Enterprise versions through 1.21.8, 1.20.13, and 1.19.19), an authenticated attacker may manipulate an identity value referenced by a templated policy path to gain unintended access to Vault paths. The vulnerability allows attackers who can control a referenced identity value to include slash (/) characters that Vault interprets as additional path segments when rendering the policy, enabling path traversal to access secrets outside their authorized scope. This vulnerability affects the Vault server policy evaluation engine. Red Hat products that use the HashiCorp Vault Go client library (github.com/hashicorp/vault/api) to connect to external Vault servers are not directly vulnerable, as policy evaluation occurs server-side. However, customers running HashiCorp Vault servers should upgrade to fixed versions and enable the deny_slash_in_templated_paths configuration option.

Mitigation

For Red Hat products using the HashiCorp Vault Go client library (OpenShift Data Foundation, Ceph, and related components):

No action is required for Red Hat products. This vulnerability affects the Vault server policy evaluation engine, not client libraries. Red Hat products use the Vault Go API client to retrieve secrets from externally managed Vault servers but do not run Vault server components or evaluate policies. The vulnerable code path is not present or executed in these client library integrations.

For customers operating HashiCorp Vault servers (not Red Hat products):

1. Upgrade HashiCorp Vault to a fixed version:
     - Vault Community Edition: upgrade to version 2.0.4 or later
     - Vault Enterprise: upgrade to version 2.0.4, 1.21.9, 1.20.14, or 1.19.20 (depending on your current version stream)

2. After upgrading, set deny_slash_in_templated_paths = true in your Vault server configuration. This option defaults to false even after upgrade and must be explicitly enabled to prevent slash injection in templated policy paths.

3. Review templated policies that interpolate identity values (such as {{identity.entity.name}} or {{identity.entity.metadata.group}}) to ensure they follow least-privilege principles and do not grant excessive path access.

4. Audit Vault access logs for suspicious activity involving policy path evaluations with unexpected slash characters, particularly in identity metadata values.

5. Consider implementing additional access controls at the network level to limit who can authenticate to Vault servers.

Red Hat provides HashiCorp Vault containers certified for Red Hat OpenShift; these containers are maintained and patched by HashiCorp. Customers using these containers should follow HashiCorp's upgrade guidance to deploy fixed versions.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score8.1N/A6.8
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/AHigh
Privileges RequiredLowN/ALow
User InteractionNoneN/ANone
ScopeUnchangedN/AUnchanged
ConfidentialityHighN/AHigh
Integrity ImpactHighN/AHigh
Availability ImpactNoneN/ANone

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

cve.org: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Understanding the Weakness (CWE)

Integrity,Confidentiality,Availability

Technical Impact: Execute Unauthorized Code or Commands

The attacker may be able to create or overwrite critical files that are used to execute code, such as programs or libraries.

Integrity

Technical Impact: Modify Files or Directories

The attacker may be able to overwrite or create critical files, such as programs, libraries, or important data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, appending a new account at the end of a password file may allow an attacker to bypass authentication.

Confidentiality

Technical Impact: Read Files or Directories

The attacker may be able read the contents of unexpected files and expose sensitive data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, by reading a password file, the attacker could conduct brute force password guessing attacks in order to break into an account on the system.

Availability

Technical Impact: DoS: Crash, Exit, or Restart

The attacker may be able to overwrite, delete, or corrupt unexpected critical files such as programs, libraries, or important data. This may prevent the product from working at all and in the case of protection mechanisms such as authentication, it has the potential to lock out product users.

Frequently Asked Questions

Want to get errata notifications? Sign up here.