CVE-2022-41720
Summary
| CVE | CVE-2022-41720 |
|---|---|
| State | PUBLIC |
| Assigner | [email protected] |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2022-12-07 17:15:00 UTC |
| Updated | 2022-12-12 14:58:00 UTC |
| 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. |
Risk And Classification
Problem Types: CWE-22
NVD Known Affected Configurations (CPE 2.3)
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| 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 |
No vendor comments have been submitted for this CVE.
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)