cbcvebase.
CVE-2022-41720
published 2022-12-07

CVE-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
VendorProductVersion rangeFixed in
debiangolang-1.15< golang-1.19 1.19.4-1 (bookworm)golang-1.19 1.19.4-1 (bookworm)
debiangolang-1.19< golang-1.19 1.19.4-1 (bookworm)golang-1.19 1.19.4-1 (bookworm)
go_standard_librarynet_http< 1.18.91.18.9
go_standard_librarynet_http>= 1.19.0-0 < 1.19.41.19.4
go_standard_libraryos< 1.18.91.18.9
go_standard_libraryos>= 1.19.0-0 < 1.19.41.19.4
golanggo< 1.18.91.18.9
golanggo>= 1.19.0 < 1.19.41.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.