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
Published: 2026-07-20
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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 yet.

History

Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Syslog-ng
Syslog-ng syslog-ng
Vendors & Products Syslog-ng
Syslog-ng syslog-ng

Tue, 21 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Tue, 21 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Mon, 20 Jul 2026 17:15:00 +0000

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'}


Subscriptions

Syslog-ng Syslog-ng
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-21T16:11:18.899Z

Reserved: 2026-04-07T20:32:03.010Z

Link: CVE-2026-39879

cve-icon Vulnrichment

Updated: 2026-07-21T16:11:12.566Z

cve-icon NVD

Status : Deferred

Published: 2026-07-20T17:17:07.550

Modified: 2026-07-23T16:04:11.740

Link: CVE-2026-39879

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-20T16:57:32Z

Links: CVE-2026-39879 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T19:00:09Z

Weaknesses
  • CWE-150

    Improper Neutralization of Escape, Meta, or Control Sequences