golang-1.19 — security advisory
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.
- Products
- golang-1.19
- Affected versions
- Not specified
- Fixed versions
- 1.19.4-1
- CVEs
- CVE-2022-41720
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 14:52 UTC · Revision 1
Source evidence
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.
osv:DEBIAN-CVE-2022-41720
golang-1.19
Fixed versions: 1.19.4-1
Complete source record
{
"id": "61a6d4e1ededc09e589ab52624629e7751788378a2e8df642518ac7d8026a0d9",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2022-41720",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2022-41720",
"summary": "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.",
"evidence": "osv:DEBIAN-CVE-2022-41720",
"products": [
{
"name": {
"value": "golang-1.19",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.19.4-1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "DEBIAN-CVE-2022-41720",
"aliases": [
"DEBIAN-CVE-2022-41720"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.19.4-1"
}
]
}
],
"package": {
"name": "golang-1.19",
"purl": "pkg:deb/debian/golang-1.19?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-41720.json"
},
"ecosystem_specific": {
"urgency": "unimportant"
}
}
],
"modified": "2026-10-15T08:02:32.097694196Z",
"provider": "osv",
"upstream": [
"CVE-2022-41720"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2022-41720"
]
},
"related_cves": [
{
"value": "CVE-2022-41720",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 323548,
"published_at": "2022-12-07T17:15:10.293+00:00"
}