{"schemaVersion":3,"id":"CVE-2023-4782","aliases":["GHSA-h626-pv66-hhm7","GO-2023-2055"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2023-09-08T17:04:33.242Z","modified":"2024-09-26T14:05:36.006Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.8,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":6.3,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Go","score":6.3,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N","exploitability":2.8,"impact":7.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00268,"percentile":0.17778,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.00268},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00268,"percentile":0.17778}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00268,"percentile":0.17778}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","description":"The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/22.html"}],"affected":[{"vendor":"github.com/hashicorp","product":"terraform","name":"github.com/hashicorp/terraform","label":"terraform","ecosystem":"Go","cpePart":null,"purl":"pkg:golang/github.com/hashicorp/terraform","purlType":"golang","versions":[{"text":"≥ 1.0.8, < 1.5.7","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.0.8, < 1.5.7","eol":null,"hubHref":null},{"vendor":"hashicorp","product":"terraform","name":"terraform","label":"terraform","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.0.8, < 1.5.7","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.0.8, < 1.5.7","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"terraform","label":"Hashicorp Terraform","category":"app"}},"hubHref":"/vendor/hashicorp/terraform"}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://discuss.hashicorp.com/t/hcsec-2023-27-terraform-allows-arbitrary-file-write-during-init-operation/58082","label":"discuss.hashicorp.com/t/…","hostname":"discuss.hashicorp.com","tags":["WEB","Vendor Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-4782","label":"nvd.nist.gov/vuln/detail/CVE-2023-4782","hostname":"nvd.nist.gov","tags":["Advisory","Oval"]},{"url":"https://github.com/hashicorp/terraform/pull/33745","label":"github.com/hashicorp/terraform/pull/33745","hostname":"github.com","tags":["WEB","FIX"]},{"url":"https://github.com/hashicorp/terraform/commit/0f2314fb62193c4be94328cc026fcb7ec1e9b893","label":"github.com/hashicorp/terraform/commit/0f2314fb62193c4be94328cc026fcb7ec1e9b893","hostname":"github.com","tags":["WEB","FIX"]},{"url":"https://github.com/hashicorp/terraform","label":"github.com/hashicorp/terraform","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/hashicorp/terraform/releases/tag/v1.5.7","label":"github.com/hashicorp/terraform/releases/tag/v1.5.7","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/advisories/GHSA-h626-pv66-hhm7","label":"github.com/advisories/GHSA-h626-pv66-hhm7","hostname":"github.com","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2023-09-08T17:04:33.242Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-09-26T14:05:36.006Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":31,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T02:36:10.639Z","stale":false,"partial":false}}