Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

nvd логотип

CVE-2022-41720

Опубликовано: 07 дек. 2022
Источник: nvd
CVSS3: 7.5
EPSS Низкий

Уязвимость доступа к ограниченным файлам через функции "os.DirFS" и тип "http.Dir" на Windows

Описание

На Windows злоумышленник способен получить доступ к ограниченным файлам с помощью функции os.DirFS и типа http.Dir. Эти методы обеспечивают доступ к дереву файлов, начиная с указанного каталога. Злоумышленник получает возможность чтения файлов устройств Windows в этой корневой директории. Например, os.DirFS("C:/tmp").Open("COM1") открывает устройство COM1. Оба метода предоставляют доступ к файловой системе только для чтения. Более того, в Windows использование os.DirFS для корневой директории текущего диска позволяет использовать специально созданный путь, чтобы выйти за пределы этого диска и получить доступ к любому пути в системе.

Тип уязвимости

Доступ к ограниченным файлам

Ссылки

Уязвимые конфигурации

Конфигурация 1

Одновременно

Одно из

cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
Версия до 1.18.9 (исключая)
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
Версия от 1.19.0 (включая) до 1.19.4 (исключая)
cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*

EPSS

Процентиль: 13%
0.00043
Низкий

7.5 High

CVSS3

Дефекты

CWE-22

Связанные уязвимости

CVSS3: 7.5
ubuntu
больше 2 лет назад

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.

CVSS3: 7.5
redhat
больше 2 лет назад

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.

CVSS3: 7.5
debian
больше 2 лет назад

On Windows, restricted files can be accessed via os.DirFS and http.Dir ...

CVSS3: 7.5
github
больше 2 лет назад

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.

suse-cvrf
больше 2 лет назад

Security update for go1.18

EPSS

Процентиль: 13%
0.00043
Низкий

7.5 High

CVSS3

Дефекты

CWE-22