CVE-2023-50260: Wazuh's vulnerability in host_deny AR script allows arbitrary command execution

CVE-2023-50260 affects 34 listed versions of Wazuh in the Dawnsentry catalogue.

8.8CVSS high
Proof of concept publicexploitation
41%EPSS (next 30 days)
19 April 2024published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

Wazuh

34 of 82 listed versions are affected. Fixed in 4.7.2. The newest release, 4.14.11, is not affected.

4.7.1 4.7.0 4.6.0 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.11 4.3.10 4.3.9 4.3.8 4.3.7 4.3.6 4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.7 4.2.6 4.2.5 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0

What it is

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.

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD)

Published by GitHub on 19 April 2024. Last changed 17 June 2026.

Sources

Check one version you run: look CVE-2023-50260 up, or pick a product and version in the quick lookup.

Updated 2 December 2026.