GHSA-6w3m-4hhp-775q: KEDA has PostgreSQL connection string parameter injection via incomplete whitespace escaping
KEDA versions prior to 2.20.0 contain a vulnerability in the PostgreSQL scaler connection string construction where tenant-controlled parameters are insufficiently escaped. This allows injection of additional libpq connection parameters by including unescaped ASCII whitespace characters such as tabs, leading to potential connection string manipulation. An attacker with the ability to create TriggerAuthentication or ScaledObject resources can force disabling of TLS (sslmode=disable), redirect connections to attacker-controlled hosts, and append arbitrary runtime parameters. This can result in credential exposure and downgrade of connection security.
AI Analysis
Technical Summary
The vulnerability exists in the function escapePostgreConnectionParameter in pkg/scalers/postgresql_scaler.go, which only escapes parameters containing literal spaces but ignores other ASCII whitespace characters (tabs, newlines, carriage returns, form feeds). Since libpq connection strings separate parameters by any whitespace, an attacker can inject additional key=value pairs by including these characters in tenant-controllable fields (host, port, userName, dbName, sslmode). This leads to injection of parameters such as sslmode=disable or host=attacker.example.com, enabling silent TLS downgrade and redirection of connections to attacker-controlled hosts, potentially exposing credentials. The password parameter is appended last, limiting but not eliminating credential theft. The suggested fix is to escape or reject all ASCII whitespace and backslashes, prefer URI connection strings with URL encoding, and validate inputs against allow-lists.
Potential Impact
An attacker able to supply connection parameters can silently downgrade TLS connections by forcing sslmode=disable, redirect connections to attacker-controlled hosts to capture credentials, and append arbitrary libpq parameters to alter connection behavior. This compromises confidentiality by enabling man-in-the-middle attacks and credential theft. The attack requires low privileges (ability to create TriggerAuthentication or ScaledObject with crafted parameters) but can have high confidentiality impact. Integrity impact is limited to connection parameter manipulation; availability is not affected.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid using untrusted input in PostgreSQL connection parameters or sanitize inputs to reject or escape all ASCII whitespace characters (including tabs, newlines, carriage returns, form feeds, vertical tabs) and backslashes. Prefer using URI-style PostgreSQL connection strings with proper URL encoding. Validate all tenant-supplied fields against strict allow-list patterns before use.
GHSA-6w3m-4hhp-775q: KEDA has PostgreSQL connection string parameter injection via incomplete whitespace escaping
Description
KEDA versions prior to 2.20.0 contain a vulnerability in the PostgreSQL scaler connection string construction where tenant-controlled parameters are insufficiently escaped. This allows injection of additional libpq connection parameters by including unescaped ASCII whitespace characters such as tabs, leading to potential connection string manipulation. An attacker with the ability to create TriggerAuthentication or ScaledObject resources can force disabling of TLS (sslmode=disable), redirect connections to attacker-controlled hosts, and append arbitrary runtime parameters. This can result in credential exposure and downgrade of connection security.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the function escapePostgreConnectionParameter in pkg/scalers/postgresql_scaler.go, which only escapes parameters containing literal spaces but ignores other ASCII whitespace characters (tabs, newlines, carriage returns, form feeds). Since libpq connection strings separate parameters by any whitespace, an attacker can inject additional key=value pairs by including these characters in tenant-controllable fields (host, port, userName, dbName, sslmode). This leads to injection of parameters such as sslmode=disable or host=attacker.example.com, enabling silent TLS downgrade and redirection of connections to attacker-controlled hosts, potentially exposing credentials. The password parameter is appended last, limiting but not eliminating credential theft. The suggested fix is to escape or reject all ASCII whitespace and backslashes, prefer URI connection strings with URL encoding, and validate inputs against allow-lists.
Potential Impact
An attacker able to supply connection parameters can silently downgrade TLS connections by forcing sslmode=disable, redirect connections to attacker-controlled hosts to capture credentials, and append arbitrary libpq parameters to alter connection behavior. This compromises confidentiality by enabling man-in-the-middle attacks and credential theft. The attack requires low privileges (ability to create TriggerAuthentication or ScaledObject with crafted parameters) but can have high confidentiality impact. Integrity impact is limited to connection parameter manipulation; availability is not affected.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid using untrusted input in PostgreSQL connection parameters or sanitize inputs to reject or escape all ASCII whitespace characters (including tabs, newlines, carriage returns, form feeds, vertical tabs) and backslashes. Prefer using URI-style PostgreSQL connection strings with proper URL encoding. Validate all tenant-supplied fields against strict allow-list patterns before use.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-6w3m-4hhp-775q
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-53572"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a4e4ee6c9d9e3dbe32899d4
Added to database: 07/08/2026, 13:21:42 UTC
Last enriched: 07/08/2026, 13:39:10 UTC
Last updated: 07/08/2026, 14:10:35 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.