{"id":"CVE-2026-45099","aliases":["CVE-2026-45099","GHSA-8394-6f8r-whxg","GO-2026-6241"],"related":[],"kind":"vulnerability","state":"published","title":"Terragrunt: Arbitrary File Deletion via Malicious Module Manifest","summary":"Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu or Terraform to scale. Prior to 1.0.4, Terragrunt trusts paths decoded from a downloaded module's .terragrunt-module-manifest during fileManifest.Clean() in internal/util/file.go. A malicious or compromised external module can place absolute or traversal paths in the manifest, causing cleanup to delete files outside the module cache that are accessible to the Terragrunt process before OpenTofu or Terraform executes. This deletion-only primitive can remove local source code or configuration and disrupt CI/CD pipelines. This issue is fixed in version 1.0.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu or Terraform to scale. Prior to 1.0.4, Terragrunt trusts paths decoded from a downloaded module's .terragrunt-module-manifest during fileManifest.Clean() in internal/util/file.go. A malicious or compromised external module can place absolute or traversal paths in the manifest, causing cleanup to delete files outside the module cache that are accessible to the Terragrunt process before OpenTofu or Terraform executes. This deletion-only primitive can remove local source code or configuration and disrupt CI/CD pipelines. This issue is fixed in version 1.0.4.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Terragrunt: Arbitrary File Deletion via Malicious Module Manifest in github.com/gruntwork-io/terragrunt","format":"markdown","source":"go"},{"lang":"es","text":"Terragrunt es una herramienta de orquestación flexible que permite escalar la Infraestructura como Código escrita en OpenTofu o Terraform. Antes de la versión 1.0.4, Terragrunt confía en las rutas decodificadas del archivo .terragrunt-module-manifest de un módulo descargado durante fileManifest.Clean() en internal/util/file.go. Un módulo externo malicioso o comprometido puede colocar rutas absolutas o de recorrido en el manifiesto, provocando que la limpieza elimine archivos fuera de la caché del módulo que son accesibles para el proceso de Terragrunt antes de que OpenTofu o Terraform se ejecuten. Esta primitiva de solo eliminación puede eliminar código fuente o configuración local y alterar las pipelines de CI/CD. Este problema está solucionado en la versión 1.0.4.","source":"nvd"}],"published":"2026-08-17T16:37:34.000Z","modified":"2026-10-12T16:10:00.220Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"}],"cwes":["CWE-20","CWE-22"],"affected":[{"ranges":[{"version":"< 1.0.4","status":"affected"}],"vendor":"gruntwork-io","product":"terragrunt","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.0.4"}],"ecosystem":"Go","package":"github.com/gruntwork-io/terragrunt","purl":"pkg:golang/github.com/gruntwork-io/terragrunt","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.0.4"}],"ecosystem":"Go","package":"github.com/gruntwork-io/terragrunt","purl":"pkg:golang/github.com/gruntwork-io/terragrunt","source":"go"}],"references":[{"url":"https://github.com/gruntwork-io/terragrunt/security/advisories/GHSA-8394-6f8r-whxg","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gruntwork-io/terragrunt/pull/6032","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/gruntwork-io/terragrunt/commit/3d6f10d6bccc851c6506a307a0b8675e0346e65e","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/gruntwork-io/terragrunt/releases/tag/v1.0.4","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gruntwork-io/terragrunt","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-08-25T14:23:03.914Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45099","url":"https://www.cve.org/CVERecord?id=CVE-2026-45099","licence":"CVE Terms of Use","modified":"2026-08-25T14:23:16.006Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8394-6f8r-whxg","url":"https://github.com/advisories/GHSA-8394-6f8r-whxg","licence":"CC-BY-4.0","modified":"2026-08-18T14:55:57.579Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6241","url":"https://pkg.go.dev/vuln/GO-2026-6241","licence":"CC-BY-4.0","modified":"2026-08-18T14:45:04.094Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45099","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45099","licence":"Public domain","modified":"2026-10-12T16:10:00.220Z"}],"updatedAt":"2026-11-25T22:59:34.823Z","epss":{"score":0.00423,"percentile":0.38535,"date":"2026-12-01T12:00:22.000Z"}}