{"id":"CVE-2023-50260","published":"2024-04-19T14:28:20Z","modified":"2024-08-02T22:16:46Z","title":"Wazuh's vulnerability in host_deny AR script allows arbitrary command execution","vendor":"wazuh","product":"wazuh","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.4116,"percentile":0.98697,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/wazuh/wazuh/security/advisories/GHSA-mjq2-xf8g-68vw","tags":["x_refsource_CONFIRM"]}],"priority":{"score":25.9,"factors":[{"name":"EPSS percentile","points":19.74},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"wazuh","affectedVersions":[{"vendor":"wazuh","product":"wazuh","versions":[">= 4.2.0, < 4.7.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2024-04-22T19:12:01.001698Z","from":"CISA ADP","provenance":"source"},"summary":{"text":"The flaw is improper input validation in the host_deny active response script of Wazuh, a threat detection and response platform, which lets arbitrary strings be written into the hosts.deny file. An attacker who can trigger the active response feature, which is possible with low privileges and network access, can inject spawn directives into that file to execute arbitrary commands, either as root on the Wazuh server (local privilege escalation) or as root on agents.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T05:39:22Z"},"euvd":{"id":"EUVD-2023-55074","exploited":false,"provenance":"source"}}