Severity by source
AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionCVE.org
SQL injection in PostgreSQL logical replication ALTER SUBSCRIPTION ... REFRESH PUBLICATION allows a subscriber table creator to execute arbitrary SQL with the subscription's publication-side credentials. The attack takes effect at the next REFRESH PUBLICATION. Within major versions 16, 17, and 18, minor versions before PostgreSQL 18.4, 17.10, and 16.14 are affected. Versions before PostgreSQL 16 are unaffected.
AnalysisAI
SQL injection in PostgreSQL logical replication ALTER SUBSCRIPTION REFRESH PUBLICATION allows authenticated local or network users with table creation privileges to execute arbitrary SQL queries with the publication subscriber's credentials. The attack is deferred until the next REFRESH PUBLICATION command is executed, requiring user interaction or scheduled maintenance. PostgreSQL 16.x, 17.x, and 18.x versions prior to 16.14, 17.10, and 18.4 respectively are vulnerable; earlier versions are unaffected. No public exploit code or active exploitation has been identified.
Technical ContextAI
PostgreSQL's logical replication subsystem enables subscribers to replicate tables from a remote publisher using subscription objects. The ALTER SUBSCRIPTION command with REFRESH PUBLICATION parameter automatically detects schema changes on the publisher side. The vulnerability stems from insufficient input validation (CWE-89: SQL injection) in how subscription metadata is processed when refreshing table definitions. An attacker with CREATE TABLE privileges on the subscriber can craft malicious table definitions that, when matched against publisher schemas during refresh, inject SQL commands executed in the context of the replication worker process, which runs with the publisher connection's credentials.
RemediationAI
Upgrade to PostgreSQL 16.14, 17.10, 18.4, or any subsequent release in the respective major version series. For organizations unable to patch immediately, implement role-based access control (RBAC) restricting CREATE TABLE privileges on subscribers to trusted database administrators only, preventing untrusted users from injecting malicious table definitions. Alternatively, disable automatic schema refresh by avoiding ALTER SUBSCRIPTION REFRESH PUBLICATION commands in favor of manual table management, accepting the operational burden of synchronizing schema changes. Monitor logical replication worker logs for unexpected SQL execution. These workarounds maintain replication functionality while reducing exploit surface, though they impose administrative overhead and may delay detection of intentional schema changes. Security advisory available at https://www.postgresql.org/support/security/CVE-2026-6638/.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
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
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
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
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
Same weakness CWE-89 – SQL Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-30290
GHSA-3835-x2rj-c3qj