CVE-2024-58375 OpenTofu before 1.8.3 Secret Variable Leaking via Static Evaluation

High 8.7 Published Updated

OpenTofu users enabling static evaluation may inadvertently expose sensitive variables and locals, requiring an upgrade to prevent data leakage.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-58375?

CVE-2024-58375 is a high-severity vulnerability in opentofu, published on 16 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

OpenTofu versions 1.8.0 through 1.8.2 do not properly restrict sensitive variables and locals when users have opted into static evaluation of module sources, versions, and backend configurations. As a result, values marked as sensitive may be exposed through these configuration elements instead of producing an error. This is fixed in OpenTofu 1.8.3, which adds explicit errors to prevent the use of sensitive values in these contexts.

Weakness: CWE-497

Which versions are affected by CVE-2024-58375?

3 open source packages ship an affected version, including github.com/opentofu/opentofu.

PackageAffectedFixed in
github.com/opentofu/opentofu GoFrom 1.8.01.8.3
github.com/opentofu/opentofu GoFrom 1.8.01.8.3
github.com/opentofu/opentofu GoFrom 1.8.01.8.3

How do I fix CVE-2024-58375?

Upgrade github.com/opentofu/opentofu to 1.8.3 or later.

Is CVE-2024-58375 being exploited?

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

Sources

Also known as GHSA-p8hv-x2cr-398f, GHSA-wpr2-j6gr-pjw9, GO-2024-3182.

Is CVE-2024-58375 in your software?

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

Check your SBOMs for free