# CVE-2023-22496: Netdata vulnerable to command injection

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

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Jan 2023
- **Updated:** 10 Mar 2025
- **Also known as:** DEBIAN-CVE-2023-22496, GHSA-xg38-3vmw-2978

## 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 (Improper Neutralization of Special Elements used in a Command), CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2023-22496?

It affects 1 product.


Products: Netdata Netdata.

## How do I fix CVE-2023-22496?

Upgrade to a fixed version.

## 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:

- PoC for CVE-2023-22496: Netdata Agent <1.37 OS Command Injection via registry_hostname (github_poc): https://github.com/jstjep00/CVE-2023-22496-PoC

## Other vulnerabilities in netdata

- [CVE-2023-22497](https://insights.sbomify.com/CVE-2023-22497/): Netdata is vulnerable to improper authentication (medium 6.5)
- [CVE-2019-9834](https://insights.sbomify.com/CVE-2019-9834/): Cross-site scripting in n/a (medium 6.1)
- [CVE-2025-71385](https://insights.sbomify.com/CVE-2025-71385/): Netdata < 2.3.1 - Reflected Cross-Site Scripting via love Parameter in ilove.svg Endpoint (medium 5.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-22496 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-22496 exists.

Affected product: netdata. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-22496/ (Markdown: https://insights.sbomify.com/CVE-2023-22496/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-22496
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-22496
- OSV: https://osv.dev/vulnerability/CVE-2023-22496

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-22496/
Summaries are generated and may contain mistakes; the official description above is the record.
