CVE-2026-45099: Terragrunt Arbitrary File Deletion Vulnerability

MODERATE
Advisory Identifier: GHSA-8394-6f8r-whxg
CWE-20
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-45099
GHSA Identifier GHSA-8394-6f8r-whxg
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-20: Improper Input Validation
Affected Product Terragrunt
Package Ecosystem Go
Published Date
Last Updated

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.

github.com/gruntwork-io/terragrunt fixed: 1.0.4
Upgrade github.com/gruntwork-io/terragrunt to 1.0.4
Verify Direct and Transitive Dependencies

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

### Summary Terragrunt 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. ### Impact This 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. In 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. This vulnerability is a deletion-only primitive; it does not directly allow for arbitrary code execution (RCE) or data exfiltration. ### Affected Versions - Terragrunt < `v1.0.4` ### Patches This vulnerability has been resolved in Terragrunt version `v1.0.4`. All users are strongly advised to upgrade. ### Workarounds If users cannot upgrade immediately, they can mitigate this risk by: 1. Strictly auditing the source URLs of all remote modules used in their Terragrunt configurations. 2. Only consuming modules from trusted, internally vetted sources or verified registries. 3. Pinning module versions to specific, known-safe Git commit SHAs rather than mutable tags or branches. ### Technical Details Terragrunt 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. Previously, 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. ## Credit Terragrunt would like to thank Francesco Sabiu ([@fsabiu](https://github.com/fsabiu)) for discovering and responsibly disclosing this vulnerability.

CVE-2026-45099 Affected Terragrunt Versions

1 component(s)
Fixed Versions:
1.0.4
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?
CVE-2026-45099 is a security vulnerability in Terragrunt involving Arbitrary File Deletion via Malicious Module Manifest under CWE-20: Improper Input Validation.
Which Terragrunt versions are affected?
Affected versions include releases prior to 1.0.4 across affected packages: github.com/gruntwork-io/terragrunt.
What version fixes CVE-2026-45099?
Upgrading to 1.0.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/gruntwork-io/terragrunt affected?
Yes, github.com/gruntwork-io/terragrunt is affected in releases prior to 1.0.4. Upgrade your dependency to 1.0.4 or later.
What CWE is associated with CVE-2026-45099?
CVE-2026-45099 is classified under CWE-20: Improper Input Validation (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.).
How can I check Go dependencies for CVE-2026-45099?
Run the dependency tree command: 'inspect dependencies for github.com/gruntwork-io/terragrunt'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}