Description
KEDA is a Kubernetes-based Event Driven Autoscaling component. Prior to 2.20.0, pkg/scalers/postgresql_scaler.go constructs libpq-style connection strings from tenant-controlled host, port, userName, dbName, sslmode, and password values, while escapePostgreConnectionParameter() only quotes values containing a literal space. Tabs, newlines, carriage returns, form feeds, vertical tabs, quotes, and backslashes can therefore create additional key-value tokens when pgx parses the string. An attacker able to create or modify a TriggerAuthentication or ScaledObject can inject host or sslmode parameters, redirect the database connection to an attacker-controlled server, expose credentials, or disable intended TLS protection. This issue is fixed in version 2.20.0.
Published: 2026-08-21
Score: 5.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Credential compromise through PostgreSQL connection string injection
Action: Patch
AI Analysis

Impact

The vulnerability originates from the PostgreSQL scaler component of KEDA, where user-supplied connection parameters are concatenated into a libpq-style connection string after only spaces are escaped. Because tabs, newlines, carriage returns, form feeds, vertical tabs, quotes, and backslashes are not treated as special characters, an attacker can inject arbitrary key‑value pairs into the string. By manipulating the host or sslmode parameters within a TriggerAuthentication or ScaledObject, the attacker can redirect the database connection to an attacker‑controlled server and expose credentials that would otherwise be protected by TLS. This injection does not rely on a prior PostgreSQL login; it merely diverts the connection at the client side, potentially leaking sensitive information. The weakness is a classic parameter injection flaw (CWE‑74/CWE‑89).

Affected Systems

KEDA, developed by kedacore, is vulnerable on all releases before version 2.20.0. Any deployment that includes the PostgreSQL scaler using a TriggerAuthentication or ScaledObject with tenant-controlled values is affected. The fix was introduced in KEDA 2.20.0, which performs proper escaping of all connection string parameters. Objects built with earlier versions that have not been upgraded remain susceptible.

Risk and Exploitability

The CVSS base score of 5.9 signals moderate severity. No EPSS score is available, and the vulnerability is not listed in the CISA KEV catalog, suggesting limited public exploitation evidence. Exploitation requires the ability to create or modify TriggerAuthentication or ScaledObject custom resources within the Kubernetes cluster, typically implying a privileged or compromised user. If an attacker can achieve this, they can redirect database traffic and capture credentials. While unlikely to be exploited by unauthenticated external attackers, insider misuse or compromised cluster access could lead to credential loss or data exfiltration.

Generated by OpenCVE AI on August 21, 2026 at 21:34 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade KEDA to version 2.20.0 or later to apply the vendor‑provided escape fix.
  • Restrict RBAC permissions for creating or modifying TriggerAuthentication and ScaledObject resources to trusted administrators only to prevent unauthorized injection.
  • Implement a network policy that blocks outbound connections from KEDA scaler pods to arbitrary external hosts, mitigating the possibility of connection redirection.
  • Configure the scaler to enforce sslmode=require or enforce TLS verification during deployment to ensure encryption is not bypassed.

Generated by OpenCVE AI on August 21, 2026 at 21:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-6w3m-4hhp-775q KEDA has PostgreSQL connection string parameter injection via incomplete whitespace escaping
History

Tue, 25 Aug 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Sun, 23 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
First Time appeared Kedacore
Kedacore keda
Vendors & Products Kedacore
Kedacore keda

Fri, 21 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Description KEDA is a Kubernetes-based Event Driven Autoscaling component. Prior to 2.20.0, pkg/scalers/postgresql_scaler.go constructs libpq-style connection strings from tenant-controlled host, port, userName, dbName, sslmode, and password values, while escapePostgreConnectionParameter() only quotes values containing a literal space. Tabs, newlines, carriage returns, form feeds, vertical tabs, quotes, and backslashes can therefore create additional key-value tokens when pgx parses the string. An attacker able to create or modify a TriggerAuthentication or ScaledObject can inject host or sslmode parameters, redirect the database connection to an attacker-controlled server, expose credentials, or disable intended TLS protection. This issue is fixed in version 2.20.0.
Title KEDA: PostgreSQL connection string parameter injection via incomplete whitespace escaping
Weaknesses CWE-74
CWE-89
References
Metrics cvssV3_1

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


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-25T17:13:43.120Z

Reserved: 2026-06-09T19:11:53.483Z

Link: CVE-2026-53572

cve-icon Vulnrichment

Updated: 2026-08-25T17:13:32.337Z

cve-icon NVD

Status : Received

Published: 2026-08-21T21:16:59.957

Modified: 2026-08-25T18:17:55.520

Link: CVE-2026-53572

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-23T16:40:43Z

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')