CVE-2022-41720

Summary

CVECVE-2022-41720
StatePUBLIC
Assigner[email protected]
Source PriorityCVE Program / NVD first with legacy fallback
Published2022-12-07 17:15:00 UTC
Updated2022-12-12 14:58:00 UTC
DescriptionOn 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.

Risk And Classification

Problem Types: CWE-22

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Golang Go All All All All
Operating System Microsoft Windows - All All All

References

ReferenceSourceLinkTags
GO-2022-1143 - Go Packages MISC pkg.go.dev
os, net/http: avoid escapes from os.DirFS and http.Dir on Windows CVE-2022-41720 · Issue #56694 · golang/go · GitHub MISC go.dev
go.dev/cl/455716 MISC go.dev
[security] Go 1.19.4 and Go 1.18.9 are released MISC groups.google.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Legacy QID Mappings

  • 160499 Oracle Enterprise Linux Security Update for ol8addon (ELSA-2023-18908)
  • 182231 Debian Security Update for golang-1.19 (CVE-2022-41720)
  • 296101 Oracle Solaris 11.4 Support Repository Update (SRU) 59.138.2 Missing (CPUJUL2023)
  • 378599 Splunk Enterprise Third Party Package Updates for June (SVD-2023-0613)
  • 378883 Splunk Enterprise August Third Party Package Updates (SVD-2023-0808)
  • 691002 Free Berkeley Software Distribution (FreeBSD) Security Update for go (6f5192f5-75a7-11ed-83c0-411d43ce7fe4)
  • 752989 SUSE Enterprise Linux Security Update for go1.18 (SUSE-SU-2022:4398-1)
  • 753001 SUSE Enterprise Linux Security Update for go1.19 (SUSE-SU-2022:4397-1)
  • 753839 SUSE Enterprise Linux Security Update for container-suseconnect (SUSE-SU-2023:0871-1)
  • 754047 SUSE Enterprise Linux Security Update for go1.18-openssl (SUSE-SU-2023:2312-1)
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

CVE.report and Source URL Uptime Status status.cve.report