cve.bz

CVE-2022-41720 golang go: Path traversal

7.5 highEPSS 1.3%Fix available

High (7.5) in golang go. EPSS 1.3% estimated probability of exploitation activity in the next 30 days. Fixed in stdlib 1.18.9, 1.19.4.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
1.3% (unchanged from 1.3% a week ago; 1.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 71st percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2025-04-23. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-41720 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-41720?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-41720?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-41720 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Go standard library osbefore 1.18.9
Go standard library osfrom 1.19.0-0 before 1.19.4
Go standard library net/httpbefore 1.18.9
Go standard library net/httpfrom 1.19.0-0 before 1.19.4

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GO-2022-1143Gostdlib<1.18.9
>=1.19.0-0 <1.19.4
1.18.9, 1.19.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12golang-1.191.19.4-1DEBIAN-CVE-2022-41720
SUSEEnterprise Storage 7, Enterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP1-LTSS and 10 morecontainer-suseconnect2.4.0-150000.4.24.1SUSE-SU-2023:0871-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-ESPOS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 4 morego1.18-openssl1.18.10.1-150000.1.9.1SUSE-SU-2023:2312-1
SUSELinux Enterprise Module for Development Tools 15 SP3, Linux Enterprise Module for Development Tools 15 SP4go1.181.18.9-150000.1.40.1SUSE-SU-2022:4398-1
SUSELinux Enterprise Module for Development Tools 15 SP3, Linux Enterprise Module for Development Tools 15 SP4go1.191.19.4-150000.1.18.1SUSE-SU-2022:4397-1
openSUSELeap 15.3, Leap 15.4go1.181.18.9-150000.1.40.1SUSE-SU-2022:4398-1
openSUSELeap 15.3, Leap 15.4go1.191.19.4-150000.1.18.1SUSE-SU-2022:4397-1
openSUSELeap 15.4, Leap 15.5go1.18-openssl1.18.10.1-150000.1.9.1SUSE-SU-2023:2312-1
openSUSETumbleweedgo1.181.18.9-1.1openSUSE-SU-2024:12552-1
openSUSETumbleweedgo1.191.19.4-1.1openSUSE-SU-2024:12553-1
Azure Linux3golangno fix listedAZL-79038 AZL-98604

From the distributions' data via OSV.dev: the Debian Security Tracker; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

ProductPackageStateAdvisory
cert-manager Operator for Red Hat OpenShiftcert-manager-operator-containerNot affected
Cryostat 2cryostat-tech-preview/cryostat-rhel8-operatorNot affected
Custom Metric Autoscaler operator for Red Hat Openshiftcustom-metrics-autoscaler/custom-metrics-autoscaler-rhel8Not affected
Logging Subsystem for Red Hat OpenShiftopenshift-logging/logging-loki-rhel9Not affected
Migration Toolkit for Applications 6mta/mta-hub-rhel9Not affected
Migration Toolkit for Containersrhmtc/openshift-velero-plugin-rhel8Not affected
Migration Toolkit for Virtualizationmigration-toolkit-virtualization/mtv-controller-rhel9Not affected
Node HealthCheck Operatorworkload-availability/node-healthcheck-rhel8-operatorNot affected
Node Maintenance Operatorworkload-availability/node-maintenance-rhel8-operatorNot affected
OpenShift API for Data Protectionoadp/oadp-velero-rhel9Not affected
OpenShift Developer Tools and ServiceshelmNot affected
OpenShift Developer Tools and Servicesocp-tools-4/jenkins-rhel8Not affected
OpenShift Developer Tools and ServicesodoNot affected
OpenShift Pipelinesopenshift-pipelines-clientNot affected
OpenShift Secondary Scheduler Operatoropenshift-secondary-scheduler-operator/secondary-scheduler-rhel9-operatorNot affected
OpenShift Serverlessopenshift-serverless-1/client-kn-rhel8Not affected
OpenShift Serverlessopenshift-serverless-clientsNot affected
OpenShift Service Mesh 2openshift-golang-builder-containerNot affected
Red Hat 3scale API Management Platform 23scale-operator-containerNot affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/subctl-rhel9Not affected
86 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-41720.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON