CVEfocus › CVE database › CVE-2025-1094

CVE-2025-1094PostgreSQL quoting APIs miss neutralizing quoting syntax in text that fails encoding…

CVSS 8.1 HighEPSS 34.2% (higher than 99% of CVEs)Published 2025-02-13Updated 2026-11-03Assigner: PostgreSQL

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.

CWE-149

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

118Fixed
3Fix pending
10Will not fix
19Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 25.10postgresql-17Not affected
vulnerable_code_not_present
Ubuntu 24.04postgresql-16Fixed16.8-0ubuntu0.24.04.1UBUNTU-CVE-2025-1094
Ubuntu 22.04postgresql-14Fixed14.17-0ubuntu0.22.04.1UBUNTU-CVE-2025-1094
Ubuntu 20.04postgresql-12Fixed12.22-0ubuntu0.20.04.2UBUNTU-CVE-2025-1094
Ubuntu 18.04postgresql-10Fix pending10.23-0ubuntu0.18.04.2+esm3 (Ubuntu Pro)UBUNTU-CVE-2025-1094
Ubuntu 16.04postgresql-9.5Fix pendingUBUNTU-CVE-2025-1094
Ubuntu 14.04postgresql-9.3Fix pendingUBUNTU-CVE-2025-1094
Debian 13postgresql-17Fixed17.3-1DEBIAN-CVE-2025-1094
Debian 12postgresql-15Fixed15.11-0+deb12u1DEBIAN-CVE-2025-1094
Red Hat Enterprise Linux 10libpqNot affected
Red Hat Enterprise Linux 10libpq-develNot affected
Red Hat Enterprise Linux 10postgresqlNot affected
Red Hat Enterprise Linux 10postgresql-contribNot affected
Red Hat Enterprise Linux 10postgresql-docsNot affected
Red Hat Enterprise Linux 10postgresql-plperlNot affected
Red Hat Enterprise Linux 10postgresql-plpython3Not affected
Red Hat Enterprise Linux 10postgresql-pltclNot affected
Red Hat Enterprise Linux 10postgresql-private-develNot affected
Red Hat Enterprise Linux 10postgresql-private-libsNot affected
Red Hat Enterprise Linux 10postgresql-serverNot affected
Red Hat Enterprise Linux 10postgresql-server-develNot affected
Red Hat Enterprise Linux 10postgresql-staticNot affected
Red Hat Enterprise Linux 10postgresql-testNot affected
Red Hat Enterprise Linux 10postgresql-test-rpm-macrosNot affected
Red Hat Enterprise Linux 10postgresql-upgradeNot affected
Red Hat Enterprise Linux 10postgresql-upgrade-develNot affected
Red Hat Enterprise Linux 10postgresql16Not affected
Red Hat Enterprise Linux 9libpqFixed0:13.20-1.el9_5RHSA-2025:1738
Red Hat Enterprise Linux 9libpq-develFixed0:13.20-1.el9_5RHSA-2025:1738
Red Hat Enterprise Linux 9pg_repackFixed0:1.4.8-2.module+el9.5.0+22224+f5585c78RHSA-2025:1743
Red Hat Enterprise Linux 9pgauditFixed0:16.0-1.module+el9.4.0+20427+07482b8cRHSA-2025:1741
Red Hat Enterprise Linux 9pgvectorFixed0:0.6.2-1.module+el9.5.0+21770+ad2986efRHSA-2025:1743
Red Hat Enterprise Linux 9postgres-decoderbufsFixed0:2.4.0-1.Final.module+el9.4.0+20427+07482b8cRHSA-2025:1741
Red Hat Enterprise Linux 9postgresqlFixed0:13.20-1.el9_5RHSA-2025:1743
Red Hat Enterprise Linux 9postgresql-contribFixed0:16.8-1.module+el9.5.0+22865+f9400010RHSA-2025:1742
Red Hat Enterprise Linux 9postgresql-docsFixed0:13.20-1.el9_5RHSA-2025:1743
Red Hat Enterprise Linux 9postgresql-plperlFixed0:13.20-1.el9_5RHSA-2025:1741
Red Hat Enterprise Linux 9postgresql-plpython3Fixed0:15.12-1.module+el9.5.0+22866+495a739aRHSA-2025:1742
Red Hat Enterprise Linux 9postgresql-pltclFixed0:16.8-1.module+el9.5.0+22865+f9400010RHSA-2025:1742
Red Hat Enterprise Linux 9postgresql-private-develFixed0:13.20-1.el9_5RHSA-2025:1743
Red Hat Enterprise Linux 9postgresql-private-libsFixed0:16.8-1.module+el9.5.0+22865+f9400010RHSA-2025:1741
Red Hat Enterprise Linux 9postgresql-serverFixed0:13.20-1.el9_5RHSA-2025:1743
Red Hat Enterprise Linux 9postgresql-server-develFixed0:15.12-1.module+el9.5.0+22866+495a739aRHSA-2025:1743
Red Hat Enterprise Linux 9postgresql-staticFixed0:15.12-1.module+el9.5.0+22866+495a739aRHSA-2025:1743
Red Hat Enterprise Linux 9postgresql-testFixed0:16.8-1.module+el9.5.0+22865+f9400010RHSA-2025:1741
Red Hat Enterprise Linux 9postgresql-test-rpm-macrosFixed0:13.20-1.el9_5RHSA-2025:1743
Red Hat Enterprise Linux 9postgresql-upgradeFixed0:15.12-1.module+el9.5.0+22866+495a739aRHSA-2025:1742
Red Hat Enterprise Linux 9postgresql-upgrade-develFixed0:16.8-1.module+el9.5.0+22865+f9400010RHSA-2025:1742
Red Hat Enterprise Linux 8libpqFixed0:13.20-1.el8_10RHSA-2025:1737
Red Hat Enterprise Linux 8libpq-develFixed0:13.20-1.el8_10RHSA-2025:1737
Red Hat Enterprise Linux 8pg_repackFixed0:1.4.8-1.module+el8.9.0+19797+c4ce5969RHSA-2025:1736
Red Hat Enterprise Linux 8pgauditFixed0:1.5.0-1.module+el8.9.0+20664+9c30cf7fRHSA-2025:1739
Red Hat Enterprise Linux 8postgres-decoderbufsFixed0:0.10.0-2.module+el8.9.0+19330+c97ddbdfRHSA-2025:1740
Red Hat Enterprise Linux 8postgresqlFixed0:16.8-1.module+el8.10.0+22867+e4e13b1cRHSA-2025:1736
Red Hat Enterprise Linux 8postgresql-contribFixed0:16.8-1.module+el8.10.0+22867+e4e13b1cRHSA-2025:1736
Red Hat Enterprise Linux 8postgresql-docsFixed0:12.22-3.module+el8.10.0+22943+b3f02cd1RHSA-2025:1740
Red Hat Enterprise Linux 8postgresql-plperlFixed0:13.20-1.module+el8.10.0+22878+46d41b73RHSA-2025:1740
Red Hat Enterprise Linux 8postgresql-plpython3Fixed0:15.12-1.module+el8.10.0+22871+d29fc53aRHSA-2025:3082
Red Hat Enterprise Linux 8postgresql-pltclFixed0:13.20-1.module+el8.10.0+22878+46d41b73RHSA-2025:3082
Red Hat Enterprise Linux 8postgresql-private-develFixed0:15.12-1.module+el8.10.0+22871+d29fc53aRHSA-2025:1740
Red Hat Enterprise Linux 8postgresql-private-libsFixed0:16.8-1.module+el8.10.0+22867+e4e13b1cRHSA-2025:1739
Red Hat Enterprise Linux 8postgresql-serverFixed0:16.8-1.module+el8.10.0+22867+e4e13b1cRHSA-2025:1736
Red Hat Enterprise Linux 8postgresql-server-develFixed0:16.8-1.module+el8.10.0+22867+e4e13b1cRHSA-2025:3082
Red Hat Enterprise Linux 8postgresql-staticFixed0:12.22-3.module+el8.10.0+22943+b3f02cd1RHSA-2025:1739
Red Hat Enterprise Linux 8postgresql-testFixed0:16.8-1.module+el8.10.0+22867+e4e13b1cRHSA-2025:1736
Red Hat Enterprise Linux 8postgresql-test-rpm-macrosFixed0:13.20-1.module+el8.10.0+22878+46d41b73RHSA-2025:1740
Red Hat Enterprise Linux 8postgresql-upgradeFixed0:16.8-1.module+el8.10.0+22867+e4e13b1cRHSA-2025:1736
Red Hat Enterprise Linux 8postgresql-upgrade-develFixed0:15.12-1.module+el8.10.0+22871+d29fc53aRHSA-2025:1736
Red Hat Enterprise Linux 6postgresqlWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-contribWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-docsWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-plperlWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-plpythonWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-pltclWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-serverWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-testWill not fix
Out of support scope
AlmaLinux 9libpqFixed13.20-1.el9_5ALSA-2025:1738
AlmaLinux 9libpq-develFixed13.20-1.el9_5ALSA-2025:1738
AlmaLinux 9pg_repackFixed1.5.1-1.module_el9.5.0+127+50ff03a9ALSA-2025:1741
AlmaLinux 9pgauditFixed16.0-1.module_el9.4.0+66+eb9878bcALSA-2025:1741
AlmaLinux 9pgvectorFixed0.6.2-1.module_el9.5.0+120+4533eb20ALSA-2025:1743
AlmaLinux 9postgres-decoderbufsFixed2.4.0-1.Final.module_el9.4.0+66+eb9878bcALSA-2025:1741
AlmaLinux 9postgresqlFixed16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1742
AlmaLinux 9postgresql-contribFixed16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1742
AlmaLinux 9postgresql-docsFixed13.20-1.el9_5ALSA-2025:1741
AlmaLinux 9postgresql-plperlFixed15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1743
AlmaLinux 9postgresql-plpython3Fixed16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1741
AlmaLinux 9postgresql-pltclFixed16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1742
AlmaLinux 9postgresql-private-develFixed15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1742
AlmaLinux 9postgresql-private-libsFixed13.20-1.el9_5ALSA-2025:1743
AlmaLinux 9postgresql-serverFixed13.20-1.el9_5ALSA-2025:1743
AlmaLinux 9postgresql-server-develFixed13.20-1.el9_5ALSA-2025:1741
AlmaLinux 9postgresql-staticFixed13.20-1.el9_5ALSA-2025:1743
AlmaLinux 9postgresql-testFixed15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1742
AlmaLinux 9postgresql-test-rpm-macrosFixed15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1743
AlmaLinux 9postgresql-upgradeFixed16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1742
AlmaLinux 9postgresql-upgrade-develFixed13.20-1.el9_5ALSA-2025:1743
AlmaLinux 8libpqFixed13.20-1.el8_10ALSA-2025:1737
AlmaLinux 8libpq-develFixed13.20-1.el8_10ALSA-2025:1737
AlmaLinux 8pg_repackFixed1.5.1-1.module_el8.10.0+3930+ecf33554ALSA-2025:1739
AlmaLinux 8pgauditFixed16.0-1.module_el8.10.0+3798+606ebb9fALSA-2025:3082
AlmaLinux 8postgres-decoderbufsFixed0.10.0-2.module_el8.9.0+3704+f1f917ceALSA-2025:1739
AlmaLinux 8postgresqlFixed16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1739
AlmaLinux 8postgresql-contribFixed13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1739
AlmaLinux 8postgresql-docsFixed12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:1736
AlmaLinux 8postgresql-plperlFixed13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1740
AlmaLinux 8postgresql-plpython3Fixed12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:1739
AlmaLinux 8postgresql-pltclFixed16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:3082
AlmaLinux 8postgresql-private-develFixed15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1740
AlmaLinux 8postgresql-private-libsFixed16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1739
AlmaLinux 8postgresql-serverFixed12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:1736
AlmaLinux 8postgresql-server-develFixed16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:3082
AlmaLinux 8postgresql-staticFixed13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1740
AlmaLinux 8postgresql-testFixed16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1739
AlmaLinux 8postgresql-test-rpm-macrosFixed15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:3082
AlmaLinux 8postgresql-upgradeFixed13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:3082
AlmaLinux 8postgresql-upgrade-develFixed12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:1739
Rocky Linux 9libpqFixed0:13.20-1.el9_5RLSA-2025:1738
Rocky Linux 9pg_repackFixed0:1.5.1-1.module+el9.5.0+30638+72f697e1RLSA-2025:1741
Rocky Linux 9pgauditFixed0:16.0-1.module+el9.5.0+30638+72f697e1RLSA-2025:1741
Rocky Linux 9pgvectorFixed0:0.6.2-1.module+el9.5.0+30638+72f697e1RLSA-2025:1743
Rocky Linux 9postgres-decoderbufsFixed0:1.9.7-1.Final.module+el9.5.0+30637+4391fccaRLSA-2025:1743
Rocky Linux 9postgresqlFixed0:16.8-1.module+el9.5.0+30638+72f697e1RLSA-2025:1742
Rocky Linux 8libpqFixed0:13.20-1.el8_10RLSA-2025:1737
Rocky Linux 8pg_repackFixed0:1.4.8-1.module+el8.10.0+1858+fcc46a79RLSA-2025:1736
Rocky Linux 8pgauditFixed0:1.5.0-1.module+el8.9.0+1594+4a6adae9RLSA-2025:1740
Rocky Linux 8postgres-decoderbufsFixed0:2.4.0-1.Final.module+el8.10.0+1858+fcc46a79RLSA-2025:1740
Rocky Linux 8postgresqlFixed0:12.22-3.module+el8.10.0+1942+05740481RLSA-2025:1736
Alpine Linux 3.24postgresql16Fixed16.8-r0ALPINE-CVE-2025-1094
Alpine Linux 3.24postgresql17Fixed17.4-r0ALPINE-CVE-2025-1094
Alpine Linux 3.23postgresql16Fixed16.8-r0ALPINE-CVE-2025-1094
Alpine Linux 3.23postgresql17Fixed17.4-r0ALPINE-CVE-2025-1094
Alpine Linux 3.22postgresql15Fixed15.11-r0ALPINE-CVE-2025-1094
Alpine Linux 3.22postgresql16Fixed16.8-r0ALPINE-CVE-2025-1094
Alpine Linux 3.22postgresql17Fixed17.4-r0ALPINE-CVE-2025-1094
Alpine Linux 3.21postgresql15Fixed15.11-r0ALPINE-CVE-2025-1094
Alpine Linux 3.21postgresql16Fixed16.8-r0ALPINE-CVE-2025-1094
Alpine Linux 3.21postgresql17Fixed17.4-r0ALPINE-CVE-2025-1094
Alpine Linux 3.20postgresql14Fixed14.17-r0ALPINE-CVE-2025-1094
Alpine Linux 3.20postgresql15Fixed15.11-r0ALPINE-CVE-2025-1094
Alpine Linux 3.20postgresql16Fixed16.8-r0ALPINE-CVE-2025-1094
Alpine Linux 3.19postgresql13Fixed13.20-r0ALPINE-CVE-2025-1094
Alpine Linux 3.19postgresql14Fixed14.17-r0ALPINE-CVE-2025-1094
Alpine Linux 3.19postgresql15Fixed15.11-r0ALPINE-CVE-2025-1094
Alpine Linux 3.19postgresql16Fixed16.8-r0ALPINE-CVE-2025-1094
Alpine Linux 3.18postgresql13Fixed13.20-r0ALPINE-CVE-2025-1094
Alpine Linux 3.18postgresql14Fixed14.17-r0ALPINE-CVE-2025-1094
Alpine Linux 3.18postgresql15Fixed15.11-r0ALPINE-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.

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.