CVE-2023-50260

published 19 Apr 2024 · updated 2 Aug 2024

Wazuh's vulnerability in host_deny AR script allows arbitrary command execution

9.3CriticalCVSS 8.8EPSS 41%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 41%. No fixed version is recorded.

Wazuh is a free and open source platform used for threat prevention, detection, and response. A wrong validation in the `host_deny` script allows to write any string in the `hosts.deny` file, which can end in an arbitrary command execution on the target system. This vulnerability is part of the active response feature, which can automatically triggers actions in response to alerts. By default, active responses are limited to a set of pre defined executables. This is enforced by only allowing executables stored under `/var/ossec/active-response/bin` to be run as an active response. However, the `/var/ossec/active-response/bin/host_deny` can be exploited. `host_deny` is used to add IP address to the `/etc/hosts.deny` file to block incoming connections on a service level by using TCP wrappers. Attacker can inject arbitrary command into the `/etc/hosts.deny` file and execute arbitrary command by using the spawn directive. The active response can be triggered by writing events either to the local `execd` queue on server or to the `ar` queue which forwards the events to agents. So, it can leads to LPE on server as root and RCE on agent as root. This vulnerability is fixed in 4.7.2.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Wazuhwazuh>=4.2.0 <4.7.2

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in Wazuh, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2023-50260 severity on Zeptric[![CVE-2023-50260](https://zeptric.io/badge/cve/CVE-2023-50260.svg)](https://zeptric.io/cve/CVE-2023-50260)