CVE-2026-5061

Consul-template vulnerable to sandbox path bypass in file helper via a symlink attack

Published May 12, 2026 CVSS 3.1 · 4.7 Medium EPSS < 1% KEV · Not listed
Description
The consul-template library before version 0.42.0 is vulnerable to a sandbox path bypass in the file template helper that may allow reading an out-of-sandbox file. This vulnerability (CVE-2026-5061) is fixed in consul-template 0.42.0.

Analysis

AI-generated

Technical impact

The vulnerability resides in the file template helper of consul-template, allowing a sandbox path bypass that can expose files outside the intended directory. An attacker who can influence the template configuration may create a symbolic link that points to sensitive files, causing the helper to resolve and read the target file despite sandbox protection. The impact is the disclosure of confidential data from within the host system, as the attacker gains read access to arbitrary files located outside the sandboxed area.

Affected Systems

HashiCorp tooling – the Consul‑Template component in versions prior to 0.42.0 is affected. Versions older than 0.42.0 inherit the ability to resolve symbolic links within the sandbox, enabling the path traversal described.

Risk and Exploitability

The CVSS score of 4.7 indicates a moderate severity, and the vulnerability is not listed in the CISA KEV catalog, suggesting it has not yet been widely exploited. Because the attacker must manipulate the template configuration to insert a malicious symlink, the condition of exploitation requires some level of access to the template files or the ability to influence rendering. Nonetheless, the potential to read arbitrary files poses a significant confidentiality risk.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade consul-template to version 0.42.0 or later, which contains the path‐bypass fix.
  • If an immediate upgrade is not possible, disable the file template helper or remove any template files that could be used to inject symlinks.
  • Audit existing template configurations for symbolic links that point outside the intended sandbox and eliminate or restrict them.

Generated by OpenCVE AI on May 12, 2026 at 16:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Hashicorp
Hashicorp consul Template
Vendors & Products Hashicorp
Hashicorp consul Template
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description The consul-template library before version 0.42.0 is vulnerable to a sandbox path bypass in the file template helper that may allow reading an out-of-sandbox file. This vulnerability (CVE-2026-5061) is fixed in consul-template 0.42.0.
Title Consul-template vulnerable to sandbox path bypass in file helper via a symlink attack
Weaknesses CWE-59
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N'}

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')

Sources

Status
PUBLISHED
Assigner
HashiCorp
Published
Updated
May 12, 2026, 3:43 PM
Reserved
Mar 27, 2026, 6:27 PM
Status
Deferred
Published
May 12, 2026, 3:16 PM
Modified
Oct 26, 2026, 6:10 PM