Description
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.
Published: 2026-05-14
Score: 3.7 Low
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability exists in PostgreSQL's logical replication control command ALTER SUBSCRIPTION ... REFRESH PUBLICATION. A subscriber who can create a table in the subscription has the ability to inject arbitrary SQL that executes with the publication’s credentials. Once the REFRESH PUBLICATION command runs, the malicious payload is executed. This flaw is a classic SQL injection (CWE‑89) that compromises confidentiality, integrity, and availability of the replicated data by allowing an attacker to run any SQL commands on the publisher side.

Affected Systems

Affected versions are PostgreSQL major releases 16, 17, and 18; any minor release earlier than 16.14, 17.10, or 18.4, respectively, is vulnerable. Versions prior to 16 are not affected. Only PostgreSQL itself is listed as the vendor/product.

Risk and Exploitability

The CVSS score of 3.7 indicates low overall severity, and the EPSS score is unavailable, implying that its probability of exploitation is not well established but not ruled out. The vulnerability is not listed in CISA KEV. Based on the described attack path, it is likely that an attacker who is authorized to create tables for a subscription could trigger the flaw during a refresh, which may be scheduled automatically or manually. The attack requires only subscription-level permissions and does not require elevated system privileges, making it potentially exploitable in environments where subscription table creation is delegated.

Generated by OpenCVE AI on May 14, 2026 at 14:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade PostgreSQL to a patched release (≥ 18.4, ≥ 17.10, or ≥ 16.14) to eliminate the vulnerability.
  • Revoke CREATE privileges on subscription tables from untrusted or non‑admin users to prevent injection attempts.
  • Restrict the ability to issue ALTER SUBSCRIPTION … REFRESH PUBLICATION to trusted roles only, and monitor audit logs for unexpected refresh commands.

Generated by OpenCVE AI on May 14, 2026 at 14:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DSA Debian DSA DSA-6270-1 postgresql-17 security update
History

Thu, 14 May 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 14 May 2026 15:15:00 +0000

Type Values Removed Values Added
First Time appeared Postgresql
Postgresql postgresql
Vendors & Products Postgresql
Postgresql postgresql

Thu, 14 May 2026 13:30:00 +0000

Type Values Removed Values Added
Description 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.
Title PostgreSQL REFRESH PUBLICATION allows SQL injection via table name
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N'}


Subscriptions

Postgresql Postgresql
cve-icon MITRE

Status: PUBLISHED

Assigner: PostgreSQL

Published:

Updated: 2026-05-14T15:28:30.735Z

Reserved: 2026-04-19T19:58:21.650Z

Link: CVE-2026-6638

cve-icon Vulnrichment

Updated: 2026-05-14T15:28:27.447Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-14T14:16:25.937

Modified: 2026-05-14T16:21:23.190

Link: CVE-2026-6638

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-14T15:00:12Z

Weaknesses