← Back

CVE-2022-41720

nvd nist
Published: Dec 7, 2022Modified: Apr 23, 2025

JSON object

Loading...
7.5
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Exploitability: 3.9 / Impact: 3.6
Source: NVD

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.

Affected (2)

Products: Golang: Go
1 product
Go
Configuration A
2 vulnerable · 1 platform
Vulnerable SoftwareAffected Versions
Golang
Before 1.18.9
From 1.19.0 to 1.19.4
Running on/withPlatform Versions
Microsoft
Windows
All versions

References (8)

Source: security@golang.org
PatchVendor Advisory
Source: security@golang.org
Issue TrackingVendor Advisory
Source: security@golang.org
PatchRelease NotesThird Party Advisory
Source: security@golang.org
PatchVendor Advisory
Source: af854a3a-2127-422b-91ae-364da2661108
PatchVendor Advisory
Source: af854a3a-2127-422b-91ae-364da2661108
Issue TrackingVendor Advisory
Source: af854a3a-2127-422b-91ae-364da2661108
PatchRelease NotesThird Party Advisory
Source: af854a3a-2127-422b-91ae-364da2661108
PatchVendor Advisory

Timeline

No history available yet.