CVE-2022-38149
HIGH 7.5CVSS 3.1HashiCorp Consul Template could reveal Vault secret contents in error messages
HashiCorp Consul Template up to 0.27.2, 0.28.2, and 0.29.1 may expose the contents of Vault secrets in the error returned by the *template.Template.Execute method, when given a template using Vault secret contents incorrectly. Fixed in 0.27.3, 0.28.3, and 0.29.2.
- Published
- 17 Aug 2022
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-532
- Also known as
- GHSA-8449-7gc2-pwrpGO-2022-0980
- Sources
- NVDJSONOSV GHSA-8449-7gc2-pwrpJSONOSV GO-2022-0980JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | hashicorp | consul_templatecpe:2.3:a:hashicorp:consul_template:*:*:*:*:*:*:*:* |
< 0.29.2 | 0.29.2 |
| OSV | Go | github.com/hashicorp/consul-template | < 0.27.3 | 0.27.3 |
| OSV | Go | github.com/hashicorp/consul-template | >= 0.28.0, < 0.28.3 | 0.28.3 |
| OSV | Go | github.com/hashicorp/consul-template | >= 0.29.0, < 0.29.2 | 0.29.2 |
| OSV | Go | github.com/hashicorp/consul-template | < 0.27.3; >= 0.28.0, < 0.28.3; >= 0.29.0, < 0.29.2 | 0.27.3, 0.28.3, 0.29.2 |
References
- https://discuss.hashicorp.com · Vendor Advisory
- https://discuss.hashicorp.com/t/hsec-2022-16-consul-template-may-expose-vault-secrets-when-processing-invalid-input/43215 · Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2022-38149 · ADVISORY
- https://github.com/hashicorp/consul-template/commit/d6a6f4af219c28e67d847ba0e0b2bea8f5bb9076 · WEB, FIX
- https://github.com/hashicorp/consul · PACKAGE
- https://pkg.go.dev/vuln/GO-2022-0980 · WEB
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 17 Aug 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Sep 2022)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 18 Aug 2022)