CVE-2023-4782
HIGH 7.8CVSS 3.1Terraform allows arbitrary file write during the `init` operation
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.
- Published
- 8 Sep 2023
- Last modified
- 17 Jun 2026
- Assigned by
- security@hashicorp.com
- NVD status
- Modified
- Weakness
- CWE-22
- Also known as
- GHSA-h626-pv66-hhm7GO-2023-2055
- Sources
- NVDJSONOSV GHSA-h626-pv66-hhm7JSONOSV GO-2023-2055JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | security@hashicorp.com (Secondary) | CVSS 3.1 | MEDIUM 6.3 | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.3 | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | hashicorp | terraformcpe:2.3:a:hashicorp:terraform:*:*:*:*:*:-:*:* |
>= 1.0.8, < 1.5.7 | 1.5.7 |
| OSV | Go | github.com/hashicorp/terraform | >= 1.0.8, < 1.5.7 | 1.5.7 |
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 · WEB, FIX
- https://github.com/hashicorp/terraform/commit/0f2314fb62193c4be94328cc026fcb7ec1e9b893 · WEB, FIX
- 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
History
- 25 Nov 2026 20:36 UTC · NVD: first stored (published 8 Sep 2023)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Aug 2024)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 8 Sep 2023)