CVE-2026-39879

SQL injection in syslog-ng SQL destionation driver

Published Jul 20, 2026 CVSS 3.1 · 7.1 High EPSS < 1% KEV · Not listed
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

Analysis

AI-generated

Technical impact

The flaw stems from a missing sanitization call in the afsql_dd_run_query routine, allowing an attacker to inject arbitrary SQL when the syslog-ng SQL destination driver processes untrusted log data. This gives the attacker the ability to read, modify or delete records in the configured database, thereby compromising confidentiality and integrity of stored information. The vulnerability is a classic instance of CWE‑150 (Unit of Work Injection).

Affected Systems

Syslog-ng versions before 4.12, as well as the Premium Edition up to 8.2 and the Store Box up to 7.8, are vulnerable when the SQL destination driver is enabled. The driver is not activated by default; an attacker must have influence over a configuration that includes the driver to trigger the injection.

Risk and Exploitability

With a CVSS score of 7.1, the vulnerability is rated high. The EPSS of less than 1 % indicates a very low probability of exploitation, and the vulnerability is not listed in the CISA KEV catalog. Nevertheless, because the driver processes untrusted log content, an attacker could send crafted log messages that are executed against the database, making the risk real when the driver is active and exposed to untrusted sources.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to syslog‑ng 4.12 or newer, Premium Edition 8.2 or newer, or Store Box 7.8 or newer, which add the missing sanitization call.
  • If upgrading is delayed, remove or disable the SQL destination driver from the syslog‑ng configuration so that no untrusted log data reaches the database.
  • If the driver must remain operational, restrict its source list to trusted internal log agents and ensure it is not reachable from external networks.

Generated by OpenCVE AI on July 30, 2026 at 18:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Syslog-ng
Syslog-ng syslog-ng
Vendors & Products Syslog-ng
Syslog-ng syslog-ng
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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
Title SQL injection in syslog-ng SQL destionation driver
Weaknesses CWE-150
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H'}

Weaknesses
  • CWE-150

    Improper Neutralization of Escape, Meta, or Control Sequences

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 21, 2026, 4:11 PM
Reserved
Apr 7, 2026, 8:32 PM
Status
Deferred
Published
Jul 20, 2026, 5:17 PM
Modified
Jul 23, 2026, 4:04 PM
Severity
Important
Public date
Jul 20, 2026, 4:57 PM