Junglewise Threat Intelligence

CVE-2026-39196: Datadog Vector SQL injection in ClickHouse sink KeyPartitioner

CVE-2026-39196 · Severity: info · CVSS 0 · Published 2026-06-15

Vendors: Datadog.

Executive brief

Datadog Vector is a high-performance tool used for collecting and routing logs and metrics. A security flaw in how it handles data being sent to ClickHouse databases allows an attacker to manipulate where data is stored. By sending specially crafted data into the system, an attacker could redirect logs or audit records to the wrong database tables, potentially corrupting audit trails or bypassing monitoring systems.

Technical details

A SQL injection vulnerability exists in Datadog Vector v0.54.0 within the ClickHouse sink's KeyPartitioner::partition function. The root cause is insufficient escaping of the 'database' template variable when constructing INSERT statements in the set_uri_query function. While the 'table' variable is escaped, the 'database' variable is inserted into the SQL string without similar sanitization. An attacker who can control event fields used in a database template can use crafted strings (e.g., using quotes and comments) to break out of the intended identifier context. This allows the attacker to redirect the INSERT operation to any ClickHouse table accessible by Vector's credentials, leading to data integrity issues or unauthorized data insertion.

Affected products

  • Datadog Vector 0.54.0

Timeline

  • 2026-06-13: other: Vulnerability details shared via GitHub Gist
  • 2026-06-15: disclosed: CVE published

References

Related threats