GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

GHSA-8394-6F8R-WHXG

Vulnerability from github – Published: 2026-08-17 16:37 – Updated: 2026-08-17 16:37
VLAI
Summary
Terragrunt: Arbitrary File Deletion via Malicious Module Manifest
Details

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) for discovering and responsibly disclosing this vulnerability.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/gruntwork-io/terragrunt"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.0.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-45099"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-20"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-08-17T16:37:34Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "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 \u003c `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\u0027s 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\u0027s 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.",
  "id": "GHSA-8394-6f8r-whxg",
  "modified": "2026-08-17T16:37:34Z",
  "published": "2026-08-17T16:37:34Z",
  "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"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Terragrunt: Arbitrary File Deletion via Malicious Module Manifest"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…