KEDA has PostgreSQL connection string parameter injection via incomplete whitespace escaping
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 …