CVE-2026-45099: Terragrunt Arbitrary File Deletion Vulnerability
MODERATECVE-2026-45099 is a MODERATE arbitrary file deletion vulnerability (CWE-20: Improper Input Validation) affecting Terragrunt libraries in the Go ecosystem. The issue involves arbitrary file deletion via malicious module manifest. Remediation is available by upgrading affected packages to version 1.0.4.
CVE-2026-45099 at a Glance
How to Fix CVE-2026-45099
To remediate this vulnerability, upgrade all affected Terragrunt 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/gruntwork-io/terragrunt to 1.0.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/gruntwork-io/terragrunt
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-45099, inspect your project dependencies for Terragrunt:
inspect dependencies for github.com/gruntwork-io/terragrunt
Analyze the terminal output to locate any version of Terragrunt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.4), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Terragrunt, 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
CVE-2026-45099 Affected Terragrunt Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/gruntwork-io/terragrunt
|
Go |
< 1.0.4
|
1.0.4
|
References
Frequently Asked Questions
What is CVE-2026-45099?
Which Terragrunt versions are affected?
What version fixes CVE-2026-45099?
Is github.com/gruntwork-io/terragrunt affected?
What CWE is associated with CVE-2026-45099?
How can I check Go dependencies for CVE-2026-45099?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8394-6f8r-whxg",
"modified" : "2026-08-17T16:37:34Z",
"published" : "2026-08-17T16:37:34Z",
"aliases" : [ "CVE-2026-45099" ],
"summary" : "Terragrunt: Arbitrary File Deletion via Malicious Module Manifest",
"details" : "### Summary\n\nTerragrunt is vulnerable to an arbitrary file deletion flaw when downloading external modules. If a remote module contains a maliciously crafted `.terragrunt-module-manifest` file, Terragrunt can be tricked into deleting files anywhere on the local filesystem that the Terragrunt process has access to.\n\n### Impact\n\nThis vulnerability impacts users who download and run untrusted or compromised OpenTofu/Terraform modules. The file deletion occurs during the module download and initialization phase, meaning it happens before OpenTofu or Terraform executes.\n\nIn a CI/CD environment or automated runner, an attacker-controlled module could delete arbitrary files, causing denial of service in the deployment pipeline. In a local environment, it could lead to the loss of local source code or configuration files.\n\nThis vulnerability is a deletion-only primitive; it does not directly allow for arbitrary code execution (RCE) or data exfiltration.\n\n### Affected Versions\n\n- Terragrunt < `v1.0.4`\n\n### Patches\n\nThis vulnerability has been resolved in Terragrunt version `v1.0.4`. \n\nAll users are strongly advised to upgrade.\n\n### Workarounds\n\nIf users cannot upgrade immediately, they can mitigate this risk by:\n\n1. Strictly auditing the source URLs of all remote modules used in their Terragrunt configurations.\n2. Only consuming modules from trusted, internally vetted sources or verified registries.\n3. Pinning module versions to specific, known-safe Git commit SHAs rather than mutable tags or branches.\n\n### Technical Details\n\nTerragrunt tracks files copied into a downloaded module's working directory using a `.terragrunt-module-manifest` file. During the directory cleanup process, Terragrunt decodes the entries in this manifest and removes the listed files to prepare a fresh directory for OpenTofu/Terraform runs.\n\nPreviously, Terragrunt trusted the manifest provided by the downloaded module without verifying that the paths scheduled for deletion remained within the boundaries of the module's destination directory. An attacker could forge a manifest containing directory traversal paths, causing the cleanup function to target files outside the cache. The patch introduces a secure boundary check to ensure all cleaned paths remain safely isolated inside the intended manifest folder.\n\n## Credit\n\nTerragrunt would like to thank Francesco Sabiu ([@fsabiu](https://github.com/fsabiu)) for discovering and responsibly disclosing this vulnerability.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/gruntwork-io/terragrunt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gruntwork-io/terragrunt/security/advisories/GHSA-8394-6f8r-whxg"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gruntwork-io/terragrunt"
}, {
"type" : "WEB",
"url" : "https://github.com/gruntwork-io/terragrunt/releases/tag/v1.0.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-17T16:37:34Z",
"nvd_published_at" : null
}
}