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

Medium 4.7 Published Updated

An attacker can bypass sandbox restrictions to read arbitrary files outside the intended directory using a symlink attack in the file helper.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-5061?

CVE-2026-5061 is a medium-severity path traversal vulnerability in HashiCorp Tooling, published on 12 May 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-59

Which versions are affected by CVE-2026-5061?

1 open source package ship an affected version, including consul.

PackageAffectedFixed in
consul BitnamiFrom 0.1.00.42.0

How do I fix CVE-2026-5061?

Upgrade consul to 0.42.0 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-5061 being exploited?

There is no known exploitation of CVE-2026-5061 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as BIT-consul-2026-5061, GHSA-m633-g3vp-7qw3.

Is CVE-2026-5061 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free