Consul vulnerable to arbitrary file reads through the vault kubernetes authentication provider
Description
HashiCorp Consul and Consul Enterprise 1.18.20 up to 1.21.10 and 1.22.4 are vulnerable to arbitrary file read when configured with Kubernetes authentication. This vulnerability, CVE-2026-2808, is fixed in Consul 1.18.21, 1.21.11 and 1.22.5.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
HashiCorp Consul vulnerable to arbitrary file read via Kubernetes auth provider, allowing exfiltration of sensitive files with operator write permissions.
Vulnerability
Overview CVE-2026-2808 describes an arbitrary file read vulnerability in HashiCorp Consul and Consul Enterprise when configured with Kubernetes authentication [1][3]. The root cause lies in the Connect CA provider's use of the Vault Kubernetes authentication method. The provider reads a ServiceAccount token from a file path specified by the token_path configuration parameter. An attacker with operator write permission can set token_path to any file on the Consul server node, causing the file contents to be returned as JWT data and sent to Vault as part of the authentication request [3].
Exploitation
Prerequisites To exploit this vulnerability, an attacker must have operator write permissions within the Consul cluster. With these privileges, they can modify the token_path setting to point to an arbitrary file, such as /etc/shadow or other sensitive system files. The file contents are then exfiltrated through the Kubernetes authentication request to Vault, allowing the attacker to retrieve the data [3].
Impact
Successful exploitation leads to arbitrary file read from the Consul server host, potentially exposing sensitive information like configuration files, secrets, or system files. This can result in further compromise of the infrastructure [1][3].
Mitigation
HashiCorp has released patches in Consul 1.18.21, 1.21.11, and 1.22.5 that restrict token_path to a defined subset of directories, preventing arbitrary file reads [1][3][4]. Users should upgrade to these versions or later. No workarounds are available.
AI Insight generated on May 18, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/hashicorp/consulGo | < 1.18.21 | 1.18.21 |
github.com/hashicorp/consulGo | >= 1.22.0-rc1, < 1.22.5 | 1.22.5 |
github.com/hashicorp/consulGo | >= 1.19.0, < 1.21.11 | 1.21.11 |
Affected products
4- Range: 1.18.20 to 1.21.10, and 1.22.4
- HashiCorp/Consulv5Range: 0
- HashiCorp/Consul Enterprisev5Range: 0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4News mentions
0No linked articles in our index yet.