CVE-2023-4782 json
Terraform Allows Arbitrary File Write During Init Operation
published 2023-09-08 3 y ago modified 2026-06-17 4 mo ago also GHSA-h626-pv66-hhm7 , GO-2023-2055 , EUVD-2023-2517
- cvss
- 6.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 19%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- go github.com/hashicorp/terraform 1.5.7
- HashiCorp Terraform 1.5.7
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.27% chance of exploitation in the next 30 days, higher than 19% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.3 | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 6.3 | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/hashicorp/terraform | >=1.0.8, <1.5.7 |
1.5.7 |
Affected products
- HashiCorp Terraform
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/hashicorp/terraform/pull/33745
web, patch
-
github.com
/hashicorp/terraform/commit/0f2314fb62193c4be94328cc026fcb7ec1e9b893
web, patch
-
discuss.hashicorp.com
/t/hcsec-2023-27-terraform-allows-arbitrary-file-write-during-init-operation/58082
web, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2023-4782
advisory
-
github.com
/hashicorp/terraform
package
-
github.com
/hashicorp/terraform/releases/tag/v1.5.7
web
-
github.com
/advisories/GHSA-h626-pv66-hhm7
advisory
Sources
- CVE List CVE-2023-4782
- GitHub Advisory GHSA-h626-pv66-hhm7
- NVD CVE-2023-4782
- OSV GO-2023-2055
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.