CVSS 3.1
8.8 highCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HHigh (8.8) in postgresql postgresql. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExplain CVE-2026-6638 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-6638?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-6638?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-6638 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| postgresql:postgresql | from 16.0 before 16.14 |
| postgresql:postgresql | from 17.0 before 17.10 |
| postgresql:postgresql | from 18.0 before 18.4 |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Debian | 13 | postgresql-17 | 17.10-0+deb13u1 | DEBIAN-CVE-2026-6638 DSA-6270-1 |
| Debian | 14 | postgresql-18 | 18.4-1 | DEBIAN-CVE-2026-6638 |
| Ubuntu | 20.04:LTS | postgresql-12 | no fix listed | UBUNTU-CVE-2026-6638 |
| Ubuntu | 22.04:LTS | postgresql-14 | 14.23-0ubuntu0.22.04.1 | UBUNTU-CVE-2026-6638 |
| Ubuntu | 24.04:LTS | postgresql-16 | 16.14-0ubuntu0.24.04.1 | UBUNTU-CVE-2026-6638 |
| Ubuntu | 25.10 | postgresql-17 | 17.10-0ubuntu0.25.10.1 | UBUNTU-CVE-2026-6638 |
| Ubuntu | 26.04:LTS | postgresql-18 | 18.4-0ubuntu0.26.04.1 | UBUNTU-CVE-2026-6638 |
| Ubuntu | Pro:14.04:LTS | postgresql-9.3 | no fix listed | UBUNTU-CVE-2026-6638 |
| Ubuntu | Pro:16.04:LTS | postgresql-9.5 | no fix listed | UBUNTU-CVE-2026-6638 |
| Ubuntu | Pro:18.04:LTS | postgresql-10 | no fix listed | UBUNTU-CVE-2026-6638 |
| Red Hat | enterprise_linux:8::appstream | pg_repack, pg_repack-debuginfo, pg_repack-debugsource | 0:1.5.1-1.module+el8.10.0+22551+c0330dc9 | RHSA-2026:28143 |
| Red Hat | enterprise_linux:8::appstream | pgaudit, pgaudit-debuginfo, pgaudit-debugsource | 0:16.0-1.module+el8.10.0+20413+d8116364 | RHSA-2026:28143 |
| Red Hat | enterprise_linux:8::appstream | postgres-decoderbufs, postgres-decoderbufs-debuginfo, postgres-decoderbufs-debugsource | 0:2.4.0-1.Final.module+el8.10.0+20413+d8116364 | RHSA-2026:28143 |
| Red Hat | enterprise_linux:8::appstream | postgresql, postgresql-docs, postgresql-test and 25 more | 0:16.14-1.module+el8.10.0+24339+d919fb58 | RHSA-2026:28143 |
| Red Hat | enterprise_linux:9::appstream | pg_repack, pg_repack-debuginfo, pg_repack-debugsource | 0:1.5.1-1.module+el9.8.0+24090+8f0ee565 | RHSA-2026:26203 |
| Red Hat | enterprise_linux:9::appstream | pg_repack, pg_repack-debuginfo, pg_repack-debugsource | 0:1.5.3-1.module+el9.8.0+23739+1c42644c | RHSA-2026:26204 |
| Red Hat | enterprise_linux:9::appstream | pgaudit, pgaudit-debuginfo, pgaudit-debugsource | 0:16.0-1.module+el9.8.0+24090+8f0ee565 | RHSA-2026:26203 |
| Red Hat | enterprise_linux:9::appstream | pgaudit, pgaudit-debuginfo, pgaudit-debugsource | 0:18.0-1.module+el9.8.0+23739+1c42644c | RHSA-2026:26204 |
| Red Hat | enterprise_linux:9::appstream | pgvector, pgvector-debuginfo, pgvector-debugsource | 0:0.6.2-2.module+el9.8.0+24090+8f0ee565 | RHSA-2026:26203 |
| Red Hat | enterprise_linux:9::appstream | pgvector, pgvector-debuginfo, pgvector-debugsource | 0:0.8.1-1.module+el9.8.0+23739+1c42644c | RHSA-2026:26204 |
| Red Hat | enterprise_linux:9::appstream | postgis, postgis-docs, postgis-utils and 6 more | 0:3.5.3-5.module+el9.8.0+24090+8f0ee565 | RHSA-2026:26203 |
| Red Hat | enterprise_linux:9::appstream | postgis, postgis-docs, postgis-utils and 6 more | 0:3.6.1-2.module+el9.8.0+23739+1c42644c | RHSA-2026:26204 |
| 18 more for Red Hat in the JSON and on Red Hat's page. | ||||
| SUSE | Linux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0 | postgresql16 | 16.14-160000.1.1 | SUSE-SU-2026:22184-1 |
| SUSE | Linux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0 | postgresql17 | 17.10-160000.1.1 | SUSE-SU-2026:22149-1 |
| SUSE | Linux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0 | postgresql18 | 18.4-160000.1.1 | SUSE-SU-2026:22077-1 |
| openSUSE | Leap 16.0 | postgresql16 | 16.14-160000.1.1 | openSUSE-SU-2026:21104-1 |
| openSUSE | Leap 16.0 | postgresql17 | 17.10-160000.1.1 | openSUSE-SU-2026:20970-1 |
| openSUSE | Tumbleweed | postgresql16 | 16.14-1.1 | openSUSE-SU-2026:10808-1 |
| openSUSE | Tumbleweed | postgresql17 | 17.10-1.1 | openSUSE-SU-2026:10809-1 |
| openSUSE | Tumbleweed | postgresql18 | 18.4-1.1 | openSUSE-SU-2026:10828-1 |
| AlmaLinux | 8 | pg_repack | 1.5.1-1.module_el8.10.0+3930+ecf33554 | ALSA-2026:28143 |
| AlmaLinux | 8 | pg_repack | 1.5.1-1.module_el8.10.0+4125+ceaf7d1b | ALSA-2026:28143 |
| AlmaLinux | 8 | pg_repack | 1.5.1-1.module_el8.10.0+4199+bf03c564 | ALSA-2026:28143 |
| AlmaLinux | 8 | pgaudit | 16.0-1.module_el8.10.0+3798+606ebb9f | ALSA-2026:28143 |
| AlmaLinux | 8 | postgres-decoderbufs | 2.4.0-1.Final.module_el8.10.0+3798+606ebb9f | ALSA-2026:28143 |
| AlmaLinux | 8 | postgresql, postgresql-docs, postgresql-test and 12 more | 16.14-1.module_el8.10.0+4199+bf03c564 | ALSA-2026:28143 |
| AlmaLinux | 9 | pg_repack | 1.5.1-1.module_el9.6.0+146+c54fdeca | ALSA-2026:26203 |
| AlmaLinux | 9 | pg_repack | 1.5.3-1.module_el9.8.0+234+5456f35d | ALSA-2026:26204 |
| AlmaLinux | 9 | pgaudit | 16.0-1.module_el9.4.0+66+eb9878bc | ALSA-2026:26203 |
| AlmaLinux | 9 | pgaudit | 18.0-1.module_el9.8.0+234+5456f35d | ALSA-2026:26204 |
| AlmaLinux | 9 | pgvector | 0.6.2-2.module_el9.6.0+167+4e561146 | ALSA-2026:26203 |
| AlmaLinux | 9 | pgvector | 0.8.1-1.module_el9.8.0+234+5456f35d | ALSA-2026:26204 |
| 8 more for AlmaLinux in the JSON. | ||||
| Alpine | v3.20, v3.21, v3.22 and 2 more | postgresql16 | 16.14-r0 | ALPINE-CVE-2026-6638 |
| Alpine | v3.21, v3.22, v3.23 and 1 more | postgresql17 | 17.10-r0 | ALPINE-CVE-2026-6638 |
| Alpine | v3.23, v3.24 | postgresql18 | 18.4-r0 | ALPINE-CVE-2026-6638 |
| Azure Linux | 3 | postgresql | 16.14-1 | AZL-86825 |
| Alpaquita | 25 | postgresql17 | 17.10-r0 | BELL-CVE-2026-6638 |
| Alpaquita | stream | postgresql18 | 18.4-r0 | BELL-CVE-2026-6638 |
From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita.
Red Hat rates this Moderate.
SQL injection in PostgreSQL logical replication allows a subscriber-side table creator to execute arbitrary SQL on the publisher using the subscription's publication-side credentials. ALTER SUBSCRIPTION ... REFRESH PUBLICATION interpolates subscriber-side schema and relation names into SQL sent to the publisher without properly quoting them; a crafted relation name can therefore inject arbitrary SQL that runs with the privileges of the subscription's publication-side role the next time REFRESH PUBLICATION is executed. Exploitation requires the attacker to already hold table-creation privileges on the subscriber database, for logical replication to be configured with an untrusted subscriber-side user, and for a privileged user to subsequently run REFRESH PUBLICATION, which limits the practical attack surface for most default deployments. Only PostgreSQL major versions 16, 17, and 18 are affected; versions prior to 16 do not include the vulnerable code path (introduced by commit 875693019053b8897ec3983e292acbb439b088c3).
Upgrade to PostgreSQL 18.4, 17.10, or 16.14 (matching your major version) or later, which corrects the identifier quoting used when the subscriber's apply worker sends the REFRESH PUBLICATION SQL to the publisher. Versions prior to PostgreSQL 16 are not affected. As a temporary mitigation, restrict CREATE TABLE / table-ownership privileges on subscriber databases to trusted roles only, avoid configuring logical replication subscriptions for untrusted subscriber-side users, and scope the subscription's publication-side credentials to the minimum privileges necessary.
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | postgresql18-0:18.4-1.el10_2 | Fixed 2026-06-22 | RHSA-2026:27742 |
| Red Hat Enterprise Linux 10 | postgresql16-0:16.14-1.el10_2 | Fixed 2026-06-22 | RHSA-2026:27743 |
| Red Hat Enterprise Linux 10.0 Extended Update Support | postgresql16-0:16.14-1.el10_0 | Fixed 2026-06-22 | RHSA-2026:27718 |
| Red Hat Enterprise Linux 8 | postgresql:16-8100020260530205218.489197e6 | Fixed 2026-06-23 | RHSA-2026:28143 |
| Red Hat Enterprise Linux 9 | postgresql:16-9080020260605131007.rhel9 | Fixed 2026-06-16 | RHSA-2026:26203 |
| Red Hat Enterprise Linux 9 | postgresql:18-9080020260605125734.rhel9 | Fixed 2026-06-16 | RHSA-2026:26204 |
| Red Hat Enterprise Linux 9.4 Update Services for SAP Solutions | postgresql:16-9040020260612132455.rhel9 | Fixed 2026-06-17 | RHSA-2026:26524 |
| Red Hat Enterprise Linux 9.6 Extended Update Support | postgresql:16-9060020260612084605.rhel9 | Fixed 2026-06-17 | RHSA-2026:26525 |
| Red Hat Hardened Images | postgresql17-main-17.10-0.1.hum1 | Fixed 2026-05-26 | RHSA-2026:21182 |
| Red Hat Hardened Images | postgresql18-main-18.4-0.1.hum1 | Fixed 2026-06-03 | RHSA-2026:22878 |
| Red Hat Enterprise Linux 6 | postgresql | Not affected | |
| Red Hat Enterprise Linux 7 | postgresql | Not affected | |
| Red Hat Enterprise Linux 8 | postgresql:12/postgresql | Not affected | |
| Red Hat Enterprise Linux 8 | postgresql:15/postgresql | Not affected | |
| Red Hat Enterprise Linux 9 | postgresql | Not affected | |
| Red Hat Enterprise Linux 9 | postgresql:15/postgresql | Not affected | |
| Self-service automation portal 2 | ansible-automation-platform/bootc-automation-portal-rhel9 | Not affected |
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-6638.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.