CVE-2026-39879 SQL injection in syslog-ng SQL destionation driver

High 7.1 Published Updated

Attackers can inject SQL commands via untrusted sources in syslog-ng's SQL destination driver, requiring manual configuration to exploit.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-39879?

CVE-2026-39879 is a high-severity SQL injection vulnerability in syslog-ng, published on 20 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

Due to a missing sanitization call in [`afsql_dd_run_query`](https://github.com/syslog-ng/syslog-ng/blob/649e6e18e3459fb4467000a88dfb12fa97f9719c/modules/afsql/afsql.c#L219), syslog-ng before 4.12 are vulnerable to SQL injection from an untrusted source. This is not part of the default configuration, the SQL driver has to be manually configured.

Fixes are in syslog-ng 4.12, syslog-ng Premium Edition 8.2 and syslog-ng Store Box 7.8

Weakness: CWE-150

Which versions are affected by CVE-2026-39879?

How do I fix CVE-2026-39879?

Upgrade to a fixed version.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2026-39879 being exploited?

There is no known exploitation of CVE-2026-39879 in the wild and no public exploit code.

Sources

Also known as BELL-CVE-2026-39879, DEBIAN-CVE-2026-39879, GHSA-qwf9-6222-m24m, UBUNTU-CVE-2026-39879.

Is CVE-2026-39879 in your software?

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

Check your SBOMs for free