CVE-2025-1094PostgreSQL quoting APIs miss neutralizing quoting syntax in text that fails encoding…
Improper neutralization of quoting syntax in PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() allows a database input provider to achieve SQL injection in certain usage patterns. Specifically, SQL injection requires the application to use the function result to construct input to psql, the PostgreSQL interactive terminal. Similarly, improper neutralization of quoting syntax in PostgreSQL command line utility programs allows a source of command line arguments to achieve SQL injection when client_encoding is BIG5 and server_encoding is one of EUC_TW or MULE_INTERNAL. Versions before PostgreSQL 17.3, 16.7, 15.11, 14.16, and 13.19 are affected.
What to do
Likely to be exploited: EPSS gives a 34% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 25.10 | postgresql-17 | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | postgresql-16 | Fixed | 16.8-0ubuntu0.24.04.1 | UBUNTU-CVE-2025-1094 |
| Ubuntu 22.04 | postgresql-14 | Fixed | 14.17-0ubuntu0.22.04.1 | UBUNTU-CVE-2025-1094 |
| Ubuntu 20.04 | postgresql-12 | Fixed | 12.22-0ubuntu0.20.04.2 | UBUNTU-CVE-2025-1094 |
| Ubuntu 18.04 | postgresql-10 | Fix pending | 10.23-0ubuntu0.18.04.2+esm3 (Ubuntu Pro) | UBUNTU-CVE-2025-1094 |
| Ubuntu 16.04 | postgresql-9.5 | Fix pending | UBUNTU-CVE-2025-1094 | |
| Ubuntu 14.04 | postgresql-9.3 | Fix pending | UBUNTU-CVE-2025-1094 | |
| Debian 13 | postgresql-17 | Fixed | 17.3-1 | DEBIAN-CVE-2025-1094 |
| Debian 12 | postgresql-15 | Fixed | 15.11-0+deb12u1 | DEBIAN-CVE-2025-1094 |
| Red Hat Enterprise Linux 10 | libpq | Not affected | ||
| Red Hat Enterprise Linux 10 | libpq-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-contrib | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-docs | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-plperl | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-plpython3 | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-pltcl | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-private-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-private-libs | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-server | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-server-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-static | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-test | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-test-rpm-macros | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-upgrade | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-upgrade-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql16 | Not affected | ||
| Red Hat Enterprise Linux 9 | libpq | Fixed | 0:13.20-1.el9_5 | RHSA-2025:1738 |
| Red Hat Enterprise Linux 9 | libpq-devel | Fixed | 0:13.20-1.el9_5 | RHSA-2025:1738 |
| Red Hat Enterprise Linux 9 | pg_repack | Fixed | 0:1.4.8-2.module+el9.5.0+22224+f5585c78 | RHSA-2025:1743 |
| Red Hat Enterprise Linux 9 | pgaudit | Fixed | 0:16.0-1.module+el9.4.0+20427+07482b8c | RHSA-2025:1741 |
| Red Hat Enterprise Linux 9 | pgvector | Fixed | 0:0.6.2-1.module+el9.5.0+21770+ad2986ef | RHSA-2025:1743 |
| Red Hat Enterprise Linux 9 | postgres-decoderbufs | Fixed | 0:2.4.0-1.Final.module+el9.4.0+20427+07482b8c | RHSA-2025:1741 |
| Red Hat Enterprise Linux 9 | postgresql | Fixed | 0:13.20-1.el9_5 | RHSA-2025:1743 |
| Red Hat Enterprise Linux 9 | postgresql-contrib | Fixed | 0:16.8-1.module+el9.5.0+22865+f9400010 | RHSA-2025:1742 |
| Red Hat Enterprise Linux 9 | postgresql-docs | Fixed | 0:13.20-1.el9_5 | RHSA-2025:1743 |
| Red Hat Enterprise Linux 9 | postgresql-plperl | Fixed | 0:13.20-1.el9_5 | RHSA-2025:1741 |
| Red Hat Enterprise Linux 9 | postgresql-plpython3 | Fixed | 0:15.12-1.module+el9.5.0+22866+495a739a | RHSA-2025:1742 |
| Red Hat Enterprise Linux 9 | postgresql-pltcl | Fixed | 0:16.8-1.module+el9.5.0+22865+f9400010 | RHSA-2025:1742 |
| Red Hat Enterprise Linux 9 | postgresql-private-devel | Fixed | 0:13.20-1.el9_5 | RHSA-2025:1743 |
| Red Hat Enterprise Linux 9 | postgresql-private-libs | Fixed | 0:16.8-1.module+el9.5.0+22865+f9400010 | RHSA-2025:1741 |
| Red Hat Enterprise Linux 9 | postgresql-server | Fixed | 0:13.20-1.el9_5 | RHSA-2025:1743 |
| Red Hat Enterprise Linux 9 | postgresql-server-devel | Fixed | 0:15.12-1.module+el9.5.0+22866+495a739a | RHSA-2025:1743 |
| Red Hat Enterprise Linux 9 | postgresql-static | Fixed | 0:15.12-1.module+el9.5.0+22866+495a739a | RHSA-2025:1743 |
| Red Hat Enterprise Linux 9 | postgresql-test | Fixed | 0:16.8-1.module+el9.5.0+22865+f9400010 | RHSA-2025:1741 |
| Red Hat Enterprise Linux 9 | postgresql-test-rpm-macros | Fixed | 0:13.20-1.el9_5 | RHSA-2025:1743 |
| Red Hat Enterprise Linux 9 | postgresql-upgrade | Fixed | 0:15.12-1.module+el9.5.0+22866+495a739a | RHSA-2025:1742 |
| Red Hat Enterprise Linux 9 | postgresql-upgrade-devel | Fixed | 0:16.8-1.module+el9.5.0+22865+f9400010 | RHSA-2025:1742 |
| Red Hat Enterprise Linux 8 | libpq | Fixed | 0:13.20-1.el8_10 | RHSA-2025:1737 |
| Red Hat Enterprise Linux 8 | libpq-devel | Fixed | 0:13.20-1.el8_10 | RHSA-2025:1737 |
| Red Hat Enterprise Linux 8 | pg_repack | Fixed | 0:1.4.8-1.module+el8.9.0+19797+c4ce5969 | RHSA-2025:1736 |
| Red Hat Enterprise Linux 8 | pgaudit | Fixed | 0:1.5.0-1.module+el8.9.0+20664+9c30cf7f | RHSA-2025:1739 |
| Red Hat Enterprise Linux 8 | postgres-decoderbufs | Fixed | 0:0.10.0-2.module+el8.9.0+19330+c97ddbdf | RHSA-2025:1740 |
| Red Hat Enterprise Linux 8 | postgresql | Fixed | 0:16.8-1.module+el8.10.0+22867+e4e13b1c | RHSA-2025:1736 |
| Red Hat Enterprise Linux 8 | postgresql-contrib | Fixed | 0:16.8-1.module+el8.10.0+22867+e4e13b1c | RHSA-2025:1736 |
| Red Hat Enterprise Linux 8 | postgresql-docs | Fixed | 0:12.22-3.module+el8.10.0+22943+b3f02cd1 | RHSA-2025:1740 |
| Red Hat Enterprise Linux 8 | postgresql-plperl | Fixed | 0:13.20-1.module+el8.10.0+22878+46d41b73 | RHSA-2025:1740 |
| Red Hat Enterprise Linux 8 | postgresql-plpython3 | Fixed | 0:15.12-1.module+el8.10.0+22871+d29fc53a | RHSA-2025:3082 |
| Red Hat Enterprise Linux 8 | postgresql-pltcl | Fixed | 0:13.20-1.module+el8.10.0+22878+46d41b73 | RHSA-2025:3082 |
| Red Hat Enterprise Linux 8 | postgresql-private-devel | Fixed | 0:15.12-1.module+el8.10.0+22871+d29fc53a | RHSA-2025:1740 |
| Red Hat Enterprise Linux 8 | postgresql-private-libs | Fixed | 0:16.8-1.module+el8.10.0+22867+e4e13b1c | RHSA-2025:1739 |
| Red Hat Enterprise Linux 8 | postgresql-server | Fixed | 0:16.8-1.module+el8.10.0+22867+e4e13b1c | RHSA-2025:1736 |
| Red Hat Enterprise Linux 8 | postgresql-server-devel | Fixed | 0:16.8-1.module+el8.10.0+22867+e4e13b1c | RHSA-2025:3082 |
| Red Hat Enterprise Linux 8 | postgresql-static | Fixed | 0:12.22-3.module+el8.10.0+22943+b3f02cd1 | RHSA-2025:1739 |
| Red Hat Enterprise Linux 8 | postgresql-test | Fixed | 0:16.8-1.module+el8.10.0+22867+e4e13b1c | RHSA-2025:1736 |
| Red Hat Enterprise Linux 8 | postgresql-test-rpm-macros | Fixed | 0:13.20-1.module+el8.10.0+22878+46d41b73 | RHSA-2025:1740 |
| Red Hat Enterprise Linux 8 | postgresql-upgrade | Fixed | 0:16.8-1.module+el8.10.0+22867+e4e13b1c | RHSA-2025:1736 |
| Red Hat Enterprise Linux 8 | postgresql-upgrade-devel | Fixed | 0:15.12-1.module+el8.10.0+22871+d29fc53a | RHSA-2025:1736 |
| Red Hat Enterprise Linux 6 | postgresql | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-contrib | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-docs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-libs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-plperl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-plpython | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-pltcl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-server | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-test | Will not fix Out of support scope | ||
| AlmaLinux 9 | libpq | Fixed | 13.20-1.el9_5 | ALSA-2025:1738 |
| AlmaLinux 9 | libpq-devel | Fixed | 13.20-1.el9_5 | ALSA-2025:1738 |
| AlmaLinux 9 | pg_repack | Fixed | 1.5.1-1.module_el9.5.0+127+50ff03a9 | ALSA-2025:1741 |
| AlmaLinux 9 | pgaudit | Fixed | 16.0-1.module_el9.4.0+66+eb9878bc | ALSA-2025:1741 |
| AlmaLinux 9 | pgvector | Fixed | 0.6.2-1.module_el9.5.0+120+4533eb20 | ALSA-2025:1743 |
| AlmaLinux 9 | postgres-decoderbufs | Fixed | 2.4.0-1.Final.module_el9.4.0+66+eb9878bc | ALSA-2025:1741 |
| AlmaLinux 9 | postgresql | Fixed | 16.8-1.module_el9.5.0+141+f4b0f9b7 | ALSA-2025:1742 |
| AlmaLinux 9 | postgresql-contrib | Fixed | 16.8-1.module_el9.5.0+141+f4b0f9b7 | ALSA-2025:1742 |
| AlmaLinux 9 | postgresql-docs | Fixed | 13.20-1.el9_5 | ALSA-2025:1741 |
| AlmaLinux 9 | postgresql-plperl | Fixed | 15.12-1.module_el9.5.0+140+e3f03d9d | ALSA-2025:1743 |
| AlmaLinux 9 | postgresql-plpython3 | Fixed | 16.8-1.module_el9.5.0+141+f4b0f9b7 | ALSA-2025:1741 |
| AlmaLinux 9 | postgresql-pltcl | Fixed | 16.8-1.module_el9.5.0+141+f4b0f9b7 | ALSA-2025:1742 |
| AlmaLinux 9 | postgresql-private-devel | Fixed | 15.12-1.module_el9.5.0+140+e3f03d9d | ALSA-2025:1742 |
| AlmaLinux 9 | postgresql-private-libs | Fixed | 13.20-1.el9_5 | ALSA-2025:1743 |
| AlmaLinux 9 | postgresql-server | Fixed | 13.20-1.el9_5 | ALSA-2025:1743 |
| AlmaLinux 9 | postgresql-server-devel | Fixed | 13.20-1.el9_5 | ALSA-2025:1741 |
| AlmaLinux 9 | postgresql-static | Fixed | 13.20-1.el9_5 | ALSA-2025:1743 |
| AlmaLinux 9 | postgresql-test | Fixed | 15.12-1.module_el9.5.0+140+e3f03d9d | ALSA-2025:1742 |
| AlmaLinux 9 | postgresql-test-rpm-macros | Fixed | 15.12-1.module_el9.5.0+140+e3f03d9d | ALSA-2025:1743 |
| AlmaLinux 9 | postgresql-upgrade | Fixed | 16.8-1.module_el9.5.0+141+f4b0f9b7 | ALSA-2025:1742 |
| AlmaLinux 9 | postgresql-upgrade-devel | Fixed | 13.20-1.el9_5 | ALSA-2025:1743 |
| AlmaLinux 8 | libpq | Fixed | 13.20-1.el8_10 | ALSA-2025:1737 |
| AlmaLinux 8 | libpq-devel | Fixed | 13.20-1.el8_10 | ALSA-2025:1737 |
| AlmaLinux 8 | pg_repack | Fixed | 1.5.1-1.module_el8.10.0+3930+ecf33554 | ALSA-2025:1739 |
| AlmaLinux 8 | pgaudit | Fixed | 16.0-1.module_el8.10.0+3798+606ebb9f | ALSA-2025:3082 |
| AlmaLinux 8 | postgres-decoderbufs | Fixed | 0.10.0-2.module_el8.9.0+3704+f1f917ce | ALSA-2025:1739 |
| AlmaLinux 8 | postgresql | Fixed | 16.8-1.module_el8.10.0+3969+2c3c9353 | ALSA-2025:1739 |
| AlmaLinux 8 | postgresql-contrib | Fixed | 13.20-1.module_el8.10.0+3967+334cd65a | ALSA-2025:1739 |
| AlmaLinux 8 | postgresql-docs | Fixed | 12.22-3.module_el8.10.0+3971+15b81305 | ALSA-2025:1736 |
| AlmaLinux 8 | postgresql-plperl | Fixed | 13.20-1.module_el8.10.0+3967+334cd65a | ALSA-2025:1740 |
| AlmaLinux 8 | postgresql-plpython3 | Fixed | 12.22-3.module_el8.10.0+3971+15b81305 | ALSA-2025:1739 |
| AlmaLinux 8 | postgresql-pltcl | Fixed | 16.8-1.module_el8.10.0+3969+2c3c9353 | ALSA-2025:3082 |
| AlmaLinux 8 | postgresql-private-devel | Fixed | 15.12-1.module_el8.10.0+3968+5ca3d05a | ALSA-2025:1740 |
| AlmaLinux 8 | postgresql-private-libs | Fixed | 16.8-1.module_el8.10.0+3969+2c3c9353 | ALSA-2025:1739 |
| AlmaLinux 8 | postgresql-server | Fixed | 12.22-3.module_el8.10.0+3971+15b81305 | ALSA-2025:1736 |
| AlmaLinux 8 | postgresql-server-devel | Fixed | 16.8-1.module_el8.10.0+3969+2c3c9353 | ALSA-2025:3082 |
| AlmaLinux 8 | postgresql-static | Fixed | 13.20-1.module_el8.10.0+3967+334cd65a | ALSA-2025:1740 |
| AlmaLinux 8 | postgresql-test | Fixed | 16.8-1.module_el8.10.0+3969+2c3c9353 | ALSA-2025:1739 |
| AlmaLinux 8 | postgresql-test-rpm-macros | Fixed | 15.12-1.module_el8.10.0+3968+5ca3d05a | ALSA-2025:3082 |
| AlmaLinux 8 | postgresql-upgrade | Fixed | 13.20-1.module_el8.10.0+3967+334cd65a | ALSA-2025:3082 |
| AlmaLinux 8 | postgresql-upgrade-devel | Fixed | 12.22-3.module_el8.10.0+3971+15b81305 | ALSA-2025:1739 |
| Rocky Linux 9 | libpq | Fixed | 0:13.20-1.el9_5 | RLSA-2025:1738 |
| Rocky Linux 9 | pg_repack | Fixed | 0:1.5.1-1.module+el9.5.0+30638+72f697e1 | RLSA-2025:1741 |
| Rocky Linux 9 | pgaudit | Fixed | 0:16.0-1.module+el9.5.0+30638+72f697e1 | RLSA-2025:1741 |
| Rocky Linux 9 | pgvector | Fixed | 0:0.6.2-1.module+el9.5.0+30638+72f697e1 | RLSA-2025:1743 |
| Rocky Linux 9 | postgres-decoderbufs | Fixed | 0:1.9.7-1.Final.module+el9.5.0+30637+4391fcca | RLSA-2025:1743 |
| Rocky Linux 9 | postgresql | Fixed | 0:16.8-1.module+el9.5.0+30638+72f697e1 | RLSA-2025:1742 |
| Rocky Linux 8 | libpq | Fixed | 0:13.20-1.el8_10 | RLSA-2025:1737 |
| Rocky Linux 8 | pg_repack | Fixed | 0:1.4.8-1.module+el8.10.0+1858+fcc46a79 | RLSA-2025:1736 |
| Rocky Linux 8 | pgaudit | Fixed | 0:1.5.0-1.module+el8.9.0+1594+4a6adae9 | RLSA-2025:1740 |
| Rocky Linux 8 | postgres-decoderbufs | Fixed | 0:2.4.0-1.Final.module+el8.10.0+1858+fcc46a79 | RLSA-2025:1740 |
| Rocky Linux 8 | postgresql | Fixed | 0:12.22-3.module+el8.10.0+1942+05740481 | RLSA-2025:1736 |
| Alpine Linux 3.24 | postgresql16 | Fixed | 16.8-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.24 | postgresql17 | Fixed | 17.4-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.23 | postgresql16 | Fixed | 16.8-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.23 | postgresql17 | Fixed | 17.4-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.22 | postgresql15 | Fixed | 15.11-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.22 | postgresql16 | Fixed | 16.8-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.22 | postgresql17 | Fixed | 17.4-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.21 | postgresql15 | Fixed | 15.11-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.21 | postgresql16 | Fixed | 16.8-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.21 | postgresql17 | Fixed | 17.4-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.20 | postgresql14 | Fixed | 14.17-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.20 | postgresql15 | Fixed | 15.11-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.20 | postgresql16 | Fixed | 16.8-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.19 | postgresql13 | Fixed | 13.20-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.19 | postgresql14 | Fixed | 14.17-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.19 | postgresql15 | Fixed | 15.11-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.19 | postgresql16 | Fixed | 16.8-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.18 | postgresql13 | Fixed | 13.20-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.18 | postgresql14 | Fixed | 14.17-r0 | ALPINE-CVE-2025-1094 |
| Alpine Linux 3.18 | postgresql15 | Fixed | 15.11-r0 | ALPINE-CVE-2025-1094 |
What the vendor says
As published in the CVE record by PostgreSQL, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- PostgreSQL: affected: 17 to before 17.3, 16 to before 16.7, 15 to before 15.11, 14 to before 14.16, before 13.19; fixed in
17.3,16.7,15.11,14.16,13.19
Workaround: Confirm input passes encoding validation before quoting it.
References
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.