CVE-2023-22496 Netdata vulnerable to command injection

High 8.1 Published Updated

Attackers can execute arbitrary commands on Netdata agents via crafted streaming data, requiring streaming to be enabled.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-22496?

CVE-2023-22496 is a high-severity command injection vulnerability in netdata, published on 14 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Netdata is an open source option for real-time infrastructure monitoring and troubleshooting. An attacker with the ability to establish a streaming connection can execute arbitrary commands on the targeted Netdata agent. When an alert is triggered, the function `health_alarm_execute` is called. This function performs different checks and then enqueues a command by calling `spawn_enq_cmd`. This command is populated with several arguments that are not sanitized. One of them is the `registry_hostname` of the node for which the alert is raised. By providing a specially crafted `registry_hostname` as part of the health data that is streamed to a Netdata (parent) agent, an attacker can execute arbitrary commands at the remote host as a side-effect of the raised alert. Note that the commands are executed as the user running the Netdata Agent. This user is usually named `netdata`. The ability to run arbitrary commands may allow an attacker to escalate privileges by escalating other vulnerabilities in the system, as that user. The problem has been fixed in: Netdata agent v1.37 (stable) and Netdata agent v1.36.0-409 (nightly). As a workaround, streaming is not enabled by default. If you have previously enabled this, it can be disabled. Limiting access to the port on the recipient Agent to trusted child connections may mitigate the impact of this vulnerability.

Weakness: CWE-77, CWE-20

Which versions are affected by CVE-2023-22496?

It affects 1 product.

Products include Netdata Netdata.

How do I fix CVE-2023-22496?

Upgrade to a fixed version.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2023-22496 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-22496 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as DEBIAN-CVE-2023-22496, GHSA-xg38-3vmw-2978.

Is CVE-2023-22496 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free