Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2022-41720

golang: os, net/http: avoid escapes from os.DirFS and http.Dir on Windows

Overview

Published
7 Dec 2022
Modified
17 Jun 2026
High CVE
2 Registry packages
26 OS packages
10 Linux distributions
Yes Fix available

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.

Source: OX vulnerability database

Severity

7.5 · HIGH

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Weakness: CWE-22

Affected packages · 2

Packages affected by CVE-2022-41720
EcosystemPackageVulnerableFixed in
Bitnami golang <1.18.9>=1.19.0, <1.19.4 1.18.91.19.4
Go stdlib <1.18.9>=1.19.0-0, <1.19.4 1.18.91.19.4

Open a package to see all its vulnerabilities.

Operating systems · 23 fixes

Oracle Linux 1 release · 3 packages

fixed 3
go-toolset golang delve
Oracle Linux fixes for CVE-2022-41720
ReleasePackageFixed in
8 go-toolset 1.19.4-1.module+el8.7.0+20922+47ac84ba
8 golang +6 1.19.4-2.0.1.module+el8.7.0+20922+47ac84ba
8 delve 1.9.1-1.0.1.module+el8.7.0+20922+47ac84ba

Photon OS 2 releases · 3 packages

fixed 4
kubernetes-dashboard falco go
Photon OS fixes for CVE-2022-41720
ReleasePackageFixed in
4.0 kubernetes-dashboard 2.7.0-1.ph4
5.0 falco 0.32.2-6.0601037001.ph5
5.0 go 1.26.3-1.ph5
5.0 kubernetes-dashboard 2.7.0-6.ph5

SUSE Linux Enterprise 1 release · 4 packages

fixed 4
go1-18-openssl go1-18 go1-19 container-suseconnect
SUSE Linux Enterprise fixes for CVE-2022-41720
ReleasePackageFixed inAdvisory
15.4 go1-18-openssl +2 1.18.10.1-150000.1.9.1 SUSE-SU-2023:2312-1
15.4 go1-18 +2 1.18.9-150000.1.40.1 SUSE-SU-2022:4398-1
15.4 go1-19 +2 1.19.4-150000.1.18.1 SUSE-SU-2022:4397-1
15.4 container-suseconnect 2.4.0-150000.4.24.1 SUSE-SU-2023:0871-1

chainguard 1 release · 1 package

fixed 1
kubeflow-katib
chainguard fixes for CVE-2022-41720
ReleasePackageFixed in
kubeflow-katib 0.19.0-r40

debian 2 releases · 2 packages

affected 1 fixed 1
golang-1-15 golang-1-19
debian fixes for CVE-2022-41720
ReleasePackageFixed in
11 golang-1-15 affected
12 golang-1-19 1.19.4-1

echo 1 release · 1 package

fixed 1
golang-1-19
echo fixes for CVE-2022-41720
ReleasePackageFixed in
golang-1-19 1.19.4-1

openSUSE 1 release · 2 packages

fixed 2
go1-18 go1-19
openSUSE fixes for CVE-2022-41720
ReleasePackageFixed inAdvisory
Tumbleweed go1-18 +2 1.18.9-1.1 openSUSE-SU-2024:12552-1
Tumbleweed go1-19 +2 1.19.4-1.1 openSUSE-SU-2024:12553-1

root.io debian 1 release · 1 package

fixed 1
rootio-golang-1-19
root.io debian fixes for CVE-2022-41720
ReleasePackageFixed in
12 rootio-golang-1-19 1.19.4-1

wolfi 1 release · 1 package

fixed 1
kubeflow-katib
wolfi fixes for CVE-2022-41720
ReleasePackageFixed in
kubeflow-katib 0.19.0-r40

alpine 4 releases · 1 package

not affected 4
go
alpine fixes for CVE-2022-41720
ReleasePackageFixed in
3.22 go not affected
3.23 go not affected
3.24 go not affected
edge go not affected

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.