Vulnerability · Published Feb 13, 2025 · Assigned by PostgreSQL

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

High 8.1

In plain English

A high-severity security flaw in PostgreSQL. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 90.0% (higher than 99.8% of all known vulnerabilities). Ready-made attack tooling exists: Metasploit, public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.1High
Exploit odds (30 days)90.0%top 0.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling2Metasploit, Public PoC

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8libpq13.20-1.el8_10ALSA-2025:1737
AlmaLinux:9libpq13.20-1.el9_5ALSA-2025:1738
AlmaLinux:8libpq-devel13.20-1.el8_10ALSA-2025:1737
AlmaLinux:9libpq-devel13.20-1.el9_5ALSA-2025:1738
AlmaLinux:8pg_repack1.4.6-3.module_el8.6.0+2760+1746ec94ALSA-2025:1736
AlmaLinux:8pg_repack1.5.1-1.module_el8.10.0+3930+ecf33554ALSA-2025:1740
AlmaLinux:8pg_repack1.4.8-1.module_el8.10.0+3798+606ebb9fALSA-2025:1739
AlmaLinux:8pg_repack1.4.6-3.module_el8.9.0+3704+f1f917ceALSA-2025:1736
AlmaLinux:8pg_repack1.4.6-3.module_el8.9.0+3704+f1f917ceALSA-2025:3082
AlmaLinux:8pg_repack1.4.8-1.module_el8.9.0+3706+885c732eALSA-2025:1739
AlmaLinux:9pg_repack1.5.1-1.module_el9.5.0+127+50ff03a9ALSA-2025:1743
AlmaLinux:9pg_repack1.4.8-2.module_el9.5.0+120+4533eb20ALSA-2025:1741
AlmaLinux:9pg_repack1.5.1-1.module_el9.5.0+128+1095dce2ALSA-2025:1743
AlmaLinux:8pgaudit1.4.0-7.module_el8.9.0+3740+0e74851f.alma.1ALSA-2025:3082
AlmaLinux:8pgaudit1.5.0-1.module_el8.6.0+2760+1746ec94ALSA-2025:1736
AlmaLinux:8pgaudit1.5.0-1.module_el8.6.0+3095+ee60d910ALSA-2025:1736
AlmaLinux:8pgaudit16.0-1.module_el8.10.0+3798+606ebb9fALSA-2025:1740
AlmaLinux:8pgaudit1.7.0-1.module_el8.9.0+3706+885c732eALSA-2025:1739
AlmaLinux:8pgaudit1.4.0-7.module_el8.10.0+3889+48cb11fb.alma.1ALSA-2025:3082
AlmaLinux:9pgaudit1.7.0-1.module_el9.3.0+52+21733919ALSA-2025:1741
AlmaLinux:9pgaudit16.0-1.module_el9.4.0+66+eb9878bcALSA-2025:1743
AlmaLinux:9pgvector0.6.2-1.module_el9.5.0+120+4533eb20ALSA-2025:1743
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.9.0+3704+f1f917ceALSA-2025:3082
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.6.0+3095+ee60d910ALSA-2025:1736
AlmaLinux:8postgres-decoderbufs2.4.0-1.Final.module_el8.10.0+3798+606ebb9fALSA-2025:1740
AlmaLinux:8postgres-decoderbufs1.9.7-1.Final.module_el8.9.0+3706+885c732eALSA-2025:1739
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.6.0+2760+1746ec94ALSA-2025:1736
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.9.0+3704+f1f917ceALSA-2025:1736
AlmaLinux:9postgres-decoderbufs1.9.7-1.Final.module_el9.3.0+52+21733919ALSA-2025:1741
AlmaLinux:9postgres-decoderbufs2.4.0-1.Final.module_el9.4.0+66+eb9878bcALSA-2025:1743
AlmaLinux:8postgresql13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:8postgresql12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:8postgresql16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:9postgresql13.20-1.el9_5ALSA-2025:1742
AlmaLinux:9postgresql16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:9postgresql15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:8postgresql-contrib13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:8postgresql-contrib16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql-contrib15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:8postgresql-contrib12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:9postgresql-contrib15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:9postgresql-contrib16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:9postgresql-contrib13.20-1.el9_5ALSA-2025:1742
AlmaLinux:8postgresql-docs12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:8postgresql-docs16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql-docs15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:8postgresql-docs13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:9postgresql-docs16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:9postgresql-docs13.20-1.el9_5ALSA-2025:1742
AlmaLinux:9postgresql-docs15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:8postgresql-plperl16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql-plperl12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:8postgresql-plperl15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:8postgresql-plperl13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:9postgresql-plperl16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:9postgresql-plperl15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:9postgresql-plperl13.20-1.el9_5ALSA-2025:1742
AlmaLinux:8postgresql-plpython313.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:8postgresql-plpython316.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql-plpython312.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:8postgresql-plpython315.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:9postgresql-plpython313.20-1.el9_5ALSA-2025:1742
AlmaLinux:9postgresql-plpython315.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:9postgresql-plpython316.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:8postgresql-pltcl12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:8postgresql-pltcl15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:8postgresql-pltcl16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql-pltcl13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:9postgresql-pltcl15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:9postgresql-pltcl13.20-1.el9_5ALSA-2025:1742
AlmaLinux:9postgresql-pltcl16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:8postgresql-private-devel16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql-private-devel15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:9postgresql-private-devel15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:9postgresql-private-devel13.20-1.el9_5ALSA-2025:1742
AlmaLinux:9postgresql-private-devel16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:8postgresql-private-libs15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:8postgresql-private-libs16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:9postgresql-private-libs15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:9postgresql-private-libs16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:9postgresql-private-libs13.20-1.el9_5ALSA-2025:1742
AlmaLinux:8postgresql-server15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:8postgresql-server13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:8postgresql-server12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:8postgresql-server16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:9postgresql-server15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:9postgresql-server16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:9postgresql-server13.20-1.el9_5ALSA-2025:1742
AlmaLinux:8postgresql-server-devel13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:8postgresql-server-devel12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:8postgresql-server-devel16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql-server-devel15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:9postgresql-server-devel13.20-1.el9_5ALSA-2025:1742
AlmaLinux:9postgresql-server-devel15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:9postgresql-server-devel16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:8postgresql-static15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:8postgresql-static13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:8postgresql-static16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql-static12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:9postgresql-static16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:9postgresql-static13.20-1.el9_5ALSA-2025:1742
AlmaLinux:9postgresql-static15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:8postgresql-test15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:8postgresql-test13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:8postgresql-test16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql-test12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:9postgresql-test16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:9postgresql-test15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:9postgresql-test13.20-1.el9_5ALSA-2025:1742
AlmaLinux:8postgresql-test-rpm-macros13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:8postgresql-test-rpm-macros15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:8postgresql-test-rpm-macros16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql-test-rpm-macros12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:9postgresql-test-rpm-macros16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:9postgresql-test-rpm-macros13.20-1.el9_5ALSA-2025:1742
AlmaLinux:9postgresql-test-rpm-macros15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:8postgresql-upgrade15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:8postgresql-upgrade12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:8postgresql-upgrade16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql-upgrade13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:9postgresql-upgrade16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:9postgresql-upgrade13.20-1.el9_5ALSA-2025:1742
AlmaLinux:9postgresql-upgrade15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
AlmaLinux:8postgresql-upgrade-devel16.8-1.module_el8.10.0+3969+2c3c9353ALSA-2025:1740
AlmaLinux:8postgresql-upgrade-devel15.12-1.module_el8.10.0+3968+5ca3d05aALSA-2025:1739
AlmaLinux:8postgresql-upgrade-devel13.20-1.module_el8.10.0+3967+334cd65aALSA-2025:1736
AlmaLinux:8postgresql-upgrade-devel12.22-3.module_el8.10.0+3971+15b81305ALSA-2025:3082
AlmaLinux:9postgresql-upgrade-devel13.20-1.el9_5ALSA-2025:1742
AlmaLinux:9postgresql-upgrade-devel16.8-1.module_el9.5.0+141+f4b0f9b7ALSA-2025:1743
AlmaLinux:9postgresql-upgrade-devel15.12-1.module_el9.5.0+140+e3f03d9dALSA-2025:1741
Alpine:v3.20postgresql1414.17-r0ALPINE-CVE-2025-1094
Alpine:v3.20postgresql1515.11-r0ALPINE-CVE-2025-1094
Alpine:v3.21postgresql1515.11-r0ALPINE-CVE-2025-1094
Alpine:v3.22postgresql1515.11-r0ALPINE-CVE-2025-1094
Alpine:v3.20postgresql1616.8-r0ALPINE-CVE-2025-1094
Alpine:v3.21postgresql1616.8-r0ALPINE-CVE-2025-1094
Alpine:v3.22postgresql1616.8-r0ALPINE-CVE-2025-1094
Alpine:v3.23postgresql1616.8-r0ALPINE-CVE-2025-1094
Alpine:v3.24postgresql1616.8-r0ALPINE-CVE-2025-1094
Alpine:v3.21postgresql1717.4-r0ALPINE-CVE-2025-1094
Alpine:v3.22postgresql1717.4-r0ALPINE-CVE-2025-1094
Alpine:v3.23postgresql1717.4-r0ALPINE-CVE-2025-1094
Alpine:v3.24postgresql1717.4-r0ALPINE-CVE-2025-1094
Debian:12postgresql-1515.11-0+deb12u1DEBIAN-CVE-2025-1094
Debian:13postgresql-1717.3-1DEBIAN-CVE-2025-1094
Rocky Linux:8libpq0:13.20-1.el8_10RLSA-2025:1737
Rocky Linux:9libpq0:13.20-1.el9_5RLSA-2025:1738
Rocky Linux:8pg_repack0:1.4.8-1.module+el8.10.0+1858+fcc46a79RLSA-2025:1739
Rocky Linux:8pg_repack0:1.4.8-1.module+el8.9.0+1525+fc91df60RLSA-2025:1739
Rocky Linux:8pg_repack0:1.5.1-1.module+el8.10.0+1900+d7340343RLSA-2025:1740
Rocky Linux:8pg_repack0:1.4.6-3.module+el8.10.0+1862+29bef648RLSA-2025:1736
Rocky Linux:8pg_repack0:1.4.8-1.module+el8.10.0+1622+bd25b19cRLSA-2025:1739
Rocky Linux:8pg_repack0:1.4.6-3.module+el8.10.0+1862+29bef648RLSA-2025:3082
Rocky Linux:8pg_repack0:1.4.6-3.module+el8.9.0+1594+4a6adae9RLSA-2025:3082
Rocky Linux:8pg_repack0:1.4.6-3.module+el8.9.0+1603+444d1b54RLSA-2025:3082
Rocky Linux:9pg_repack0:1.4.8-2.module+el9.5.0+30637+4391fccaRLSA-2025:1741
Rocky Linux:9pg_repack0:1.5.1-1.module+el9.5.0+30638+72f697e1RLSA-2025:1743
Rocky Linux:8pgaudit0:1.4.0-7.module+el8.9.0+1735+a332307bRLSA-2025:3082
Rocky Linux:8pgaudit0:16.0-1.module+el8.10.0+1622+bd25b19cRLSA-2025:1740
Rocky Linux:8pgaudit0:16.0-1.module+el8.10.0+1858+fcc46a79RLSA-2025:1740
Rocky Linux:8pgaudit0:1.5.0-1.module+el8.9.0+1594+4a6adae9RLSA-2025:1736
Rocky Linux:8pgaudit0:1.7.0-1.module+el8.9.0+1525+fc91df60RLSA-2025:1739
Rocky Linux:9pgaudit0:16.0-1.module+el9.5.0+30638+72f697e1RLSA-2025:1743
Rocky Linux:9pgaudit0:1.7.0-1.module+el9.5.0+30637+4391fccaRLSA-2025:1741
Rocky Linux:9pgvector0:0.6.2-1.module+el9.5.0+30638+72f697e1RLSA-2025:1743
Rocky Linux:8postgres-decoderbufs0:1.9.7-1.Final.module+el8.9.0+1525+fc91df60RLSA-2025:1739
Rocky Linux:8postgres-decoderbufs0:2.4.0-1.Final.module+el8.10.0+1858+fcc46a79RLSA-2025:1740
Rocky Linux:8postgres-decoderbufs0:2.4.0-1.Final.module+el8.10.0+1622+bd25b19cRLSA-2025:1740
Rocky Linux:8postgres-decoderbufs0:0.10.0-2.module+el8.9.0+1594+4a6adae9RLSA-2025:3082
Rocky Linux:8postgres-decoderbufs0:0.10.0-2.module+el8.10.0+1862+29bef648RLSA-2025:3082
Rocky Linux:8postgres-decoderbufs0:0.10.0-2.module+el8.9.0+1603+444d1b54RLSA-2025:3082
Rocky Linux:8postgres-decoderbufs0:0.10.0-2.module+el8.10.0+1862+29bef648RLSA-2025:1736
Rocky Linux:9postgres-decoderbufs0:1.9.7-1.Final.module+el9.5.0+30637+4391fccaRLSA-2025:1741
Rocky Linux:9postgres-decoderbufs0:2.4.0-1.Final.module+el9.5.0+30638+72f697e1RLSA-2025:1743
Rocky Linux:8postgresql0:12.22-3.module+el8.10.0+1942+05740481RLSA-2025:3082
Rocky Linux:8postgresql0:13.20-1.module+el8.10.0+1939+bc4b0228RLSA-2025:1736
Rocky Linux:8postgresql0:16.8-1.module+el8.10.0+1941+ca32dfe4RLSA-2025:1740
Rocky Linux:8postgresql0:15.12-1.module+el8.10.0+1940+835325f2RLSA-2025:1739
Rocky Linux:9postgresql0:13.20-1.el9_5RLSA-2025:1742
Rocky Linux:9postgresql0:16.8-1.module+el9.5.0+30638+72f697e1RLSA-2025:1743
Rocky Linux:9postgresql0:15.12-1.module+el9.5.0+30637+4391fccaRLSA-2025:1741
Ubuntu:22.04:LTSpostgresql-1414.17-0ubuntu0.22.04.1USN-7315-1
Ubuntu:22.04:LTSpostgresql-1414.17-0ubuntu0.22.04.1UBUNTU-CVE-2025-1094
Ubuntu:24.04:LTSpostgresql-1616.8-0ubuntu0.24.04.1USN-7315-1
Ubuntu:24.04:LTSpostgresql-1616.8-0ubuntu0.24.04.1UBUNTU-CVE-2025-1094

Affected products (as reported)

VendorProductVersions
n/a PostgreSQL 17 – before 17.316 – before 16.715 – before 15.1114 – before 14.160 – before 13.19

Weakness: CWE-149 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

References