Quick answers
- Is CVE-2026-5061 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-5061 being exploited in the wild.
- How severe is CVE-2026-5061?
- Medium severity, with a CVSS score of 4.7, published 12 May 2026.
- Which products and versions are affected?
- HashiCorp Consul-Template < 0.42.0.
- Is there a fix for CVE-2026-5061?
- A patch was published on 2026-05-12: Fixed in version 0.42.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-5061 attacked?
- It is attacked with local access, in a software library.
- Am I affected by CVE-2026-5061?
- Check whether you run HashiCorp Consul-Template at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
A Time-of-Check Time-of-Use (TOCTOU) vulnerability exists in the 'file' template helper of consul-template. While the helper enforces a 'sandbox_path' during initial template evaluation, a subsequent dependency fetch reads the original input path without re-validating it against the sandbox restrictions. An attacker with local access can exploit this by replacing a legitimate file with a symlink after the initial check but before the fetch occurs (CWE-59). This allows the attacker to read files outside the sandbox. If the symlink is restored to a safe target before the next render cycle, the bypass may remain undetected while the template continues to use the cached out-of-sandbox content. The issue is fixed in version 0.42.0.
Affected products
- HashiCorp consul-template < 0.42.0
Timeline
- 2026-05-12: disclosed
- 2026-05-12: advisory
- 2026-05-12: patched: Fixed in version 0.42.0