NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
HIGH severity

CVE-2022-38149 — consul-template

HIGHFix: hashicorp/consul-template@d6a6f4a

CVE-2022-38149 is a high-severity (CVSS 7.5) CWE-532 vulnerability in github.com/hashicorp/consul-template. A fix is available for github.com/hashicorp/consul-template — see the affected versions and patch details below.

HashiCorp Consul Template could reveal Vault secret contents in error messages

Also known asGHSA-8449-7gc2-pwrpGO-2022-0980
Published
Updated
Affected
3 pkgs
Patched
3 / 3
Exploits
None indexed
Exploitation data as of Nov 7, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.9%probability of exploitation in next 30 days
Lower Risk+0.03%
Lower risk than most CVEs59th percentile — riskier than 59% of all scored CVEsHighest risk
0.00%0.46%0.92%1.37%0.4%0.9%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

3 pkgs affected
🐹github.com/hashicorp/consul-template🐹github.com/hashicorp/consul-template🐹github.com/hashicorp/consul-template

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

In HashiCorp Consul Template through version 0.29.1, invalid templates could inadvertently reveal the contents of Vault secret in errors returned by the *template.Template.Execute 5 method, when given a template using Vault secret contents incorrectly. This method has been updated to redact Vault secrets when creating an error string, making it safe to log the error.. This issue was fixed in version 0.29.2.

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/hashicorp/consul-templateall versions0.27.3go get github.com/hashicorp/consul-template@v0.27.3
🐹Gogithub.com/hashicorp/consul-template≥ 0.28.0&&< 0.28.30.28.3go get github.com/hashicorp/consul-template@v0.28.3
🐹Gogithub.com/hashicorp/consul-template≥ 0.29.0&&< 0.29.20.29.2go get github.com/hashicorp/consul-template@v0.29.2

Affected Products

1 product · 1 configurations
Application
consul templatehashicorp
< 0.29.2
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/hashicorp/consul-template, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/hashicorp/consul-template to 0.27.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-38149 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate
ProductFixed inAdvisory
RHODF-4.13-RHEL-9odf4/mcg-rhel9-operator:v4.13.0-41RHSA-2023:3742

Frequently Asked Questions

In HashiCorp Consul Template through version 0.29.1, invalid templates could inadvertently reveal the contents of Vault secret in errors returned by the `*template.Template.Execute 5` method, when given a template using Vault secret contents incorrectly. This method has been updated to redact Vault secrets when creating an error string, making it safe to log the error.. This issue was fixed in version 0.29.2.
O3 Security · Impact-Aware SCA

Is CVE-2022-38149 in your dependencies?

Find it across Go, including transitive dependencies.

CVE-2022-38149: consul-template — Fixed in 0.27.3