CVE-2019-18934
unbound: command injection with data coming from a specially crafted IPSECKEY answer
Severity
ModerateRed Hat Product Security
CVSS 3.0
Review impact separately from score.
Published · November 26, 2019
Updated · November 22, 2025
Description
A shell command injection vulnerability was discovered in the way unbound handles DNS queries for systems with a public key used for IPsec. When ipsecmod is enabled, a malicious DNS server could send a DNS reply which would be used during a following DNS query to execute shell commands with the privileges of the unbound process. The same attack could be performed by an attacker who can modify data transmitted over the network, before it reaches the unbound server, if DNSSEC is not used.
Statement
The versions of unbound as shipped in Red Hat Enterprise Linux 7 and 8 have ipsecmod disabled by default, even though it could be activated through the unbound-control command, it would only be executable by high-privilege users. Moreover, the username option is enabled, reducing the impact of a successful attack, and DNSSEC is used by default, preventing an attacker from modifying DNS packets on the wire. Finally, the default SELinux policies prevent unbound from running any shell command.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
- Do not enable ipsecmod in the unbound.conf configuration file nor via unbound-control, if DNSSEC based Opportunistic IPsec is not used.
- Use the
usernameoption in unbound.conf to make unbound drop privileges and reduce the impact of a successful attack. - Enable SELinux to prevent unbound from executing shell commands, apart from the expected one specified in the
ipsecmod-hookoption.
CVSS / CWE
CVSS 3.0 · 5.6CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
CWE-78 · Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')