GHSA-wpr2-j6gr-pjw9: Github.com/opentofu/opentofu OpenTofu Potential Leaking Of Secret Vulnerability
LOWGHSA-wpr2-j6gr-pjw9 is a LOW (CVSS 3.7) opentofu potential leaking of secret vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Github.com/opentofu/opentofu libraries in the Go ecosystem. The issue involves opentofu potential leaking of secret variable values when using static evaluation in v1.8. Remediation is available by upgrading affected packages to version 1.8.3.
GHSA-wpr2-j6gr-pjw9 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix GHSA-wpr2-j6gr-pjw9
To remediate this vulnerability, upgrade all affected Github.com/opentofu/opentofu dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/opentofu/opentofu to 1.8.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/opentofu/opentofu
How to Check if You Are Affected
To determine whether your application is affected by GHSA-wpr2-j6gr-pjw9, inspect your project dependencies for Github.com/opentofu/opentofu:
inspect dependencies for github.com/opentofu/opentofu
Analyze the terminal output to locate any version of Github.com/opentofu/opentofu in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.8.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Github.com/opentofu/opentofu, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-wpr2-j6gr-pjw9 Affected Github.com/opentofu/opentofu Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/opentofu/opentofu
|
Go |
≥ 1.8.0
< 1.8.3
|
1.8.3
|
References
Frequently Asked Questions
What is GHSA-wpr2-j6gr-pjw9?
Which Github.com/opentofu/opentofu versions are affected?
What version fixes GHSA-wpr2-j6gr-pjw9?
Is github.com/opentofu/opentofu affected?
What is the CVSS score of GHSA-wpr2-j6gr-pjw9?
What CWE is associated with GHSA-wpr2-j6gr-pjw9?
How can I check Go dependencies for GHSA-wpr2-j6gr-pjw9?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wpr2-j6gr-pjw9",
"modified" : "2024-10-09T22:51:43Z",
"published" : "2024-10-03T16:51:50Z",
"aliases" : [ ],
"summary" : "OpenTofu potential leaking of secret variable values when using static evaluation in v1.8",
"details" : "### Impact\nUsers who have opted into static evaluation of module sources, versions, and backend configurations may be at risk of exposing sensitive variables and locals. This is a workflow that should not be possible and explicitly show errors.\n\n### Workarounds\nCheck that you are not using sensitive variables in module sources and versions, as well as backend configurations. The patch will add explicit errors and prevent this from being possible.\n\n### Examples\n```hcl\nvariable \"backend_path\" {\n type = string\n sensitive = true\n}\n\nterraform {\n backend \"local\" {\n path = var.backend_path\n }\n}\n```\n\n```hcl\nvariable \"mod_info\" {\n type = string\n sensitive = true\n}\n\nmodule \"foo\" {\n source = var.mod_info\n //version = var.mod_info\n}\n```\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/opentofu/opentofu"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.8.0"
}, {
"fixed" : "1.8.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/opentofu/opentofu/security/advisories/GHSA-wpr2-j6gr-pjw9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/opentofu/opentofu"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-3182"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-10-03T16:51:50Z",
"nvd_published_at" : null
}
}