Описание
SSHFS is a network filesystem client for connecting to SSH servers. From version 1.4 until 3.7.6, SSHFS accepts a bracketed mount source such as [-oProxyCommand=CMD]:/path and find_base_path() removes the brackets, leaving a host value that begins with - and is passed directly to ssh as a command-line argument. When a caller also supplies a path-valued sftp_server, ssh treats the normalized host as an option and the server path as its destination, causing an injected ProxyCommand to execute locally before any connection or authentication succeeds. The attack requires a caller or wrapper that passes an attacker-controlled mount source to SSHFS with the required sftp_server configuration and results in arbitrary command execution as the user running SSHFS. This issue is fixed in version 3.7.6.
A flaw was found in SSHFS, a network filesystem client. An attacker can exploit this vulnerability by providing a specially crafted mount source that includes argument delimiters. This improper handling of the mount source allows for argument injection, leading to the execution of arbitrary commands on the system as the user running SSHFS. This occurs before any connection or authentication, posing a significant security risk.
Отчет
A flaw was found in SSHFS, a network filesystem client for connecting to SSH servers. SSHFS accepts a bracketed mount source such as [-oProxyCommand=CMD]:/path and removes the brackets during parsing, leaving a host value that begins with a dash. This value is passed directly to ssh as a command-line argument, causing ssh to interpret it as an option rather than a hostname. When combined with a path-valued sftp_server configuration, this allows an attacker who can control the mount source parameter to inject a ProxyCommand that executes arbitrary local commands as the user running SSHFS, before any SSH connection or authentication occurs. This vulnerability affects applications or wrappers that pass untrusted input as the sshfs mount source.
Меры по смягчению последствий
Update fuse-sshfs to version 3.7.6 or later. As a workaround, ensure that mount source parameters passed to sshfs come only from trusted sources and validate input to reject mount sources beginning with brackets or dashes. Applications wrapping sshfs should implement strict input validation before invoking the command.
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| Red Hat Enterprise Linux 8 | fuse-sshfs | Affected |
Показывать по
Ссылки на источники
Дополнительная информация
Статус:
EPSS
7.8 High
CVSS3
Связанные уязвимости
SSHFS is a network filesystem client for connecting to SSH servers. From version 1.4 until 3.7.6, SSHFS accepts a bracketed mount source such as [-oProxyCommand=CMD]:/path and find_base_path() removes the brackets, leaving a host value that begins with - and is passed directly to ssh as a command-line argument. When a caller also supplies a path-valued sftp_server, ssh treats the normalized host as an option and the server path as its destination, causing an injected ProxyCommand to execute locally before any connection or authentication succeeds. The attack requires a caller or wrapper that passes an attacker-controlled mount source to SSHFS with the required sftp_server configuration and results in arbitrary command execution as the user running SSHFS. This issue is fixed in version 3.7.6.
SSHFS is a network filesystem client for connecting to SSH servers. From version 1.4 until 3.7.6, SSHFS accepts a bracketed mount source such as [-oProxyCommand=CMD]:/path and find_base_path() removes the brackets, leaving a host value that begins with - and is passed directly to ssh as a command-line argument. When a caller also supplies a path-valued sftp_server, ssh treats the normalized host as an option and the server path as its destination, causing an injected ProxyCommand to execute locally before any connection or authentication succeeds. The attack requires a caller or wrapper that passes an attacker-controlled mount source to SSHFS with the required sftp_server configuration and results in arbitrary command execution as the user running SSHFS. This issue is fixed in version 3.7.6.
SSHFS is a network filesystem client for connecting to SSH servers. Fr ...
Уязвимость функции find_base_path() клиента файловой системы SSHFS, позволяющая нарушителю выполнить произвольные команды
EPSS
7.8 High
CVSS3