CVE-2022-41720
published 2022-12-07CVE-2022-41720: 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…
PriorityP344high7.5CVSS 3.1
AVNACLPRNUINSUCHINAN
EPSS
1.19%
64.0th percentile
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.
Affected
8 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | golang-1.15 | < golang-1.19 1.19.4-1 (bookworm) | golang-1.19 1.19.4-1 (bookworm) |
| debian | golang-1.19 | < golang-1.19 1.19.4-1 (bookworm) | golang-1.19 1.19.4-1 (bookworm) |
| go_standard_library | net_http | < 1.18.9 | 1.18.9 |
| go_standard_library | net_http | >= 1.19.0-0 < 1.19.4 | 1.19.4 |
| go_standard_library | os | < 1.18.9 | 1.18.9 |
| go_standard_library | os | >= 1.19.0-0 < 1.19.4 | 1.19.4 |
| golang | go | < 1.18.9 | 1.18.9 |
| golang | go | >= 1.19.0 < 1.19.4 | 1.19.4 |
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
osv7.5HIGH
vendor_debian7.5LOW
vendor_oracle7.5HIGH
vendor_redhat7.5HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Oracle
Oracle Oracle Communications Applications Risk Matrix: Core (Go) — CVE-2022-41720
vendor_oracle·2023-01-15·CVSS 7.5
CVE-2022-41720 [HIGH] Oracle Oracle Communications Applications Risk Matrix: Core (Go) — CVE-2022-41720
Oracle Oracle Communications Applications Risk Matrix: Core (Go) vulnerability
CVE: CVE-2022-41720
CVSS: 7.5
Protocol: HTTPS
Remote exploit: Yes
Affected versions: Network
Advisory: cpujan2023 (JAN 2023)
Red Hat
golang: os, net/http: avoid escapes from os.DirFS and http.Dir on Windows
vendor_redhat·2022-12-07·CVSS 7.5
CVE-2022-41720 [HIGH] CWE-22 golang: os, net/http: avoid escapes from os.DirFS and http.Dir on Windows
golang: os, net/http: avoid escapes from os.DirFS and http.Dir on Windows
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
Debian
CVE-2022-41720: golang-1.15 - On Windows, restricted files can be accessed via os.DirFS and http.Dir. The os.D...
vendor_debian·2022·CVSS 7.5
CVE-2022-41720 [HIGH] CVE-2022-41720: golang-1.15 - On Windows, restricted files can be accessed via os.DirFS and http.Dir. The os.D...
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.
Scope: local
bullseye: open
OSV
Restricted file access on Windows in os and net/http
osv·2022-12-07
CVE-2022-41720 Restricted file access on Windows in os and net/http
Restricted file access on Windows in os and net/http
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".
GHSA
GHSA-cvf9-g74c-vv79: On Windows, restricted files can be accessed via os
ghsa_unreviewed·2022-12-07
CVE-2022-41720 [HIGH] CWE-22 GHSA-cvf9-g74c-vv79: On Windows, restricted files can be accessed via os
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.
OSV
CVE-2022-41720: On Windows, restricted files can be accessed via os
osv·2022-12-07·CVSS 7.5
CVE-2022-41720 [HIGH] CVE-2022-41720: On Windows, restricted files can be accessed via os
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.
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2022-41720 golang: os, net/http: avoid escapes from os.DirFS and http.Dir on Windows
bugzilla·2023-01-16·CVSS 7.5
CVE-2022-41720 [HIGH] CVE-2022-41720 golang: os, net/http: avoid escapes from os.DirFS and http.Dir on Windows
CVE-2022-41720 golang: os, net/http: avoid escapes from os.DirFS and http.Dir on Windows
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("t
arXiv
PortGPT: Towards Automated Backporting Using Large Language Models
arxiv_fulltext·2025-10-25
PortGPT: Towards Automated Backporting Using Large Language Models
: Towards Automated Backporting Using Large Language Models
Zhaoyang Li21,
Zheng Yu31,
Jingyi Song2,
Meng Xu5,
Yuxuan Luo6,
Dongliang Mu24
2School of Cyber Science and Engineering, Huazhong University of Science and Technology, China
2Hubei Key Laboratory of Distributed System Security
3Northwestern University,
5University of Waterloo,
6Canonical Ltd.,
4JinYinHu Laboratory, China
\lizy04, jingyisong, dzm91\@hust.edu.cn
[email protected],
[email protected],
[email protected]
\@makefntext#1 1em #1
1 The first two authors contributed equally (alphabetical order).
Corresponding author
## Abstract
Patch backporting,
the process of migrating mainline security patches to older branches,
is an essential task in maintaining popular open-source projects
(e.g., Linux ke
https://go.dev/cl/455716https://go.dev/issue/56694https://groups.google.com/g/golang-announce/c/L_3rmdT0BMU/m/yZDrXjIiBQAJhttps://pkg.go.dev/vuln/GO-2022-1143https://go.dev/cl/455716https://go.dev/issue/56694https://groups.google.com/g/golang-announce/c/L_3rmdT0BMU/m/yZDrXjIiBQAJhttps://pkg.go.dev/vuln/GO-2022-1143
2022-12-07
Published