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

- Severity: Medium 6.3 (CVSS:3.1, scored by HashiCorp) `CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Published: 2023-09-08T17:04:33.242Z
- Modified: 2026-06-17T06:38:35.263Z
- Also known as: GHSA-h626-pv66-hhm7, GO-2023-2055
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: HashiCorp

## 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.

(As written by CVE List.)

## Affected

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

## Every score

- HashiCorp: CVSS:3.1 6.3 Medium `CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N`
- GitHub: CVSS:3.1 6.3 Medium `CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://discuss.hashicorp.com/t/hcsec-2023-27-terraform-allows-arbitrary-file-write-during-init-operation/58082> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-4782> (advisory)
- <https://github.com/hashicorp/terraform/pull/33745> (fix, web)
- <https://github.com/hashicorp/terraform/commit/0f2314fb62193c4be94328cc026fcb7ec1e9b893> (fix, web)
- <https://github.com/hashicorp/terraform> (package)
- <https://github.com/hashicorp/terraform/releases/tag/v1.5.7> (web)
- <https://github.com/advisories/GHSA-h626-pv66-hhm7> (advisory)

## Sources

- CVE List: [CVE-2023-4782](https://www.cve.org/CVERecord?id=CVE-2023-4782), CVE Terms of Use, modified 2024-09-26
- GitHub Advisory Database: [GHSA-h626-pv66-hhm7](https://github.com/advisories/GHSA-h626-pv66-hhm7), CC-BY-4.0, modified 2024-08-21
- Go Vulnerability Database: [GO-2023-2055](https://pkg.go.dev/vuln/GO-2023-2055), CC-BY-4.0, modified 2026-03-03
- NVD: [CVE-2023-4782](https://nvd.nist.gov/vuln/detail/CVE-2023-4782), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-4782 · Whole record: https://cve.day/CVE-2023-4782.json · Rebuilt by cve.day 2026-11-25T22:58:27.768Z
