{"api_version":"1","generated_at":"2026-04-22T23:31:48+00:00","cve":"CVE-2022-41720","urls":{"html":"https://cve.report/CVE-2022-41720","api":"https://cve.report/api/cve/CVE-2022-41720.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-41720","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-41720"},"summary":{"title":"CVE-2022-41720","description":"On Windows, restricted files can be accessed via os.DirFS and http.Dir. The os.DirFS function and http.Dir type provide access to a tree of files rooted at a given directory. These functions permit access to Windows device files under that root. For example, os.DirFS(\"C:/tmp\").Open(\"COM1\") opens the COM1 device. Both os.DirFS and http.Dir only provide read-only filesystem access. In addition, on Windows, an os.DirFS for the directory (the root of the current drive) can permit a maliciously crafted path to escape from the drive and access any path on the system. With fix applied, the behavior of os.DirFS(\"\") has changed. Previously, an empty root was treated equivalently to \"/\", so os.DirFS(\"\").Open(\"tmp\") would open the path \"/tmp\". This now returns an error.","state":"PUBLIC","assigner":"security@golang.org","published_at":"2022-12-07 17:15:00","updated_at":"2022-12-12 14:58:00"},"problem_types":["CWE-22"],"metrics":[],"references":[{"url":"https://pkg.go.dev/vuln/GO-2022-1143","name":"https://pkg.go.dev/vuln/GO-2022-1143","refsource":"MISC","tags":[],"title":"GO-2022-1143 - Go Packages","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://go.dev/issue/56694","name":"https://go.dev/issue/56694","refsource":"MISC","tags":[],"title":"os, net/http: avoid escapes from os.DirFS and http.Dir on Windows CVE-2022-41720 · Issue #56694 · golang/go · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://go.dev/cl/455716","name":"https://go.dev/cl/455716","refsource":"MISC","tags":[],"title":"","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://groups.google.com/g/golang-announce/c/L_3rmdT0BMU/m/yZDrXjIiBQAJ","name":"https://groups.google.com/g/golang-announce/c/L_3rmdT0BMU/m/yZDrXjIiBQAJ","refsource":"MISC","tags":[],"title":"[security] Go 1.19.4 and Go 1.18.9 are released","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-41720","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-41720","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"41720","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"golang","cpe5":"go","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"41720","vulnerable":"-1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"microsoft","cpe5":"windows","cpe6":"-","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2022-41720","qid":"160499","title":"Oracle Enterprise Linux Security Update for ol8addon (ELSA-2023-18908)"},{"cve":"CVE-2022-41720","qid":"182231","title":"Debian Security Update for golang-1.19 (CVE-2022-41720)"},{"cve":"CVE-2022-41720","qid":"296101","title":"Oracle Solaris 11.4 Support Repository Update (SRU) 59.138.2 Missing (CPUJUL2023)"},{"cve":"CVE-2022-41720","qid":"378599","title":"Splunk Enterprise Third Party Package Updates for June (SVD-2023-0613)"},{"cve":"CVE-2022-41720","qid":"378883","title":"Splunk Enterprise August Third Party Package Updates (SVD-2023-0808)"},{"cve":"CVE-2022-41720","qid":"691002","title":"Free Berkeley Software Distribution (FreeBSD) Security Update for go (6f5192f5-75a7-11ed-83c0-411d43ce7fe4)"},{"cve":"CVE-2022-41720","qid":"752989","title":"SUSE Enterprise Linux Security Update for go1.18 (SUSE-SU-2022:4398-1)"},{"cve":"CVE-2022-41720","qid":"753001","title":"SUSE Enterprise Linux Security Update for go1.19 (SUSE-SU-2022:4397-1)"},{"cve":"CVE-2022-41720","qid":"753839","title":"SUSE Enterprise Linux Security Update for container-suseconnect (SUSE-SU-2023:0871-1)"},{"cve":"CVE-2022-41720","qid":"754047","title":"SUSE Enterprise Linux Security Update for go1.18-openssl (SUSE-SU-2023:2312-1)"}]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2022-41720","ASSIGNER":"security@golang.org","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"On Windows, restricted files can be accessed via os.DirFS and http.Dir. The os.DirFS function and http.Dir type provide access to a tree of files rooted at a given directory. These functions permit access to Windows device files under that root. For example, os.DirFS(\"C:/tmp\").Open(\"COM1\") opens the COM1 device. Both os.DirFS and http.Dir only provide read-only filesystem access. In addition, on Windows, an os.DirFS for the directory (the root of the current drive) can permit a maliciously crafted path to escape from the drive and access any path on the system. With fix applied, the behavior of os.DirFS(\"\") has changed. Previously, an empty root was treated equivalently to \"/\", so os.DirFS(\"\").Open(\"tmp\") would open the path \"/tmp\". This now returns an error."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE 22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"Go standard library","product":{"product_data":[{"product_name":"os","version":{"version_data":[{"version_affected":"<","version_name":"0","version_value":"1.18.9"},{"version_affected":"<","version_name":"1.19.0-0","version_value":"1.19.4"}]}},{"product_name":"net/http","version":{"version_data":[{"version_affected":"<","version_name":"0","version_value":"1.18.9"},{"version_affected":"<","version_name":"1.19.0-0","version_value":"1.19.4"}]}}]}}]}},"references":{"reference_data":[{"url":"https://go.dev/issue/56694","refsource":"MISC","name":"https://go.dev/issue/56694"},{"url":"https://go.dev/cl/455716","refsource":"MISC","name":"https://go.dev/cl/455716"},{"url":"https://groups.google.com/g/golang-announce/c/L_3rmdT0BMU/m/yZDrXjIiBQAJ","refsource":"MISC","name":"https://groups.google.com/g/golang-announce/c/L_3rmdT0BMU/m/yZDrXjIiBQAJ"},{"url":"https://pkg.go.dev/vuln/GO-2022-1143","refsource":"MISC","name":"https://pkg.go.dev/vuln/GO-2022-1143"}]}},"nvd":{"publishedDate":"2022-12-07 17:15:00","lastModifiedDate":"2022-12-12 14:58:00","problem_types":["CWE-22"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"NONE","availabilityImpact":"NONE","baseScore":7.5,"baseSeverity":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"AND","children":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*","versionEndExcluding":"1.18.9","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*","versionStartIncluding":"1.19.0","versionEndExcluding":"1.19.4","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":false,"cpe23Uri":"cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*","cpe_name":[]}]}],"cpe_match":[]}]}},"legacy_mitre":{"record":null,"notes":[]}}}