← Back to CVE List
Vulnerability Intelligence Report
Restricted file access on Windows in os and net/http

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 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 Active Exploit Signals
CVSS Base Score
7.5
HIGH
Exploitability:3.9
Impact Score:3.6
EPSS Probability:1.19%
Executive Threat Verdict
Evaluating...
Evaluating Threat Landscape...
Assessing known weaponization, exploitation telemetry, and federal advisories.
Attack Surface
—
Authentication
—
Weaponization
—
SSVC Action
—

Affected Products & Versions

Vendor Product Affected Versions
Go standard library os 0 < 1.18.9 (affected), 1.19.0-0 < 1.19.4 (affected)
Go standard library net/http 0 < 1.18.9 (affected), 1.19.0-0 < 1.19.4 (affected)

References & Technical Advisories

No reference links found.

Threat Intelligence Signals

EPSS Score
1.190%

Identity & Timeline

StatusPUBLISHED
Assigning AuthorityGo Project · Vendor · USA
Reserved2022-09-28T17:00:06
Published2022-12-07T16:11:18
Last Updated2025-04-23T15:43:46

LINK COPIED TO CLIPBOARD