Description
Horde Virtual File System (VFS) API before 3.0.1 contains an OS command injection vulnerability in the Horde_Vfs_Smb driver where the _escapeShellCommand() method fails to sanitize command substitution sequences, allowing authenticated attackers to inject arbitrary shell commands through user-controlled filenames. Attackers can supply malicious filenames containing unescaped command substitution payloads through operations such as file upload, folder creation, rename, or deletion, which are interpolated into a double-quoted shell context and executed via proc_open() through /bin/sh -c before smbclient runs, resulting in arbitrary command execution on the underlying system.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| horde | Vfs | < 3.0.1 | 3.0.1 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 12 | php-horde-vfs | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | php-horde-vfs | No fix yet | — |
| Ubuntu 16.04 LTS | php-horde-vfs | No fix yet | — |
References
- Vfs 3.0.1 Release Notes release-notes
- Fix PR issue-tracking patch
- Fix Commit patch
- https://www.vulncheck.com/advisories/horde-vfs-os-command-injection-via-horde-vfs-smb-driver third-party-advisory