CVE-2025-1094 PostgreSQL quoting APIs miss neutralizing quoting syntax in text that fails encoding validation
- Published
- Updated
- Exploit status
- Public exploit available
- CISA SSVC
- No known exploitation · automatable: no · technical impact: total
- Technology
- UbuntuDebian
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.
Upgrade path
26 packages: 26 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| alpine/postgresql13(Alpine v3.18) | < 13.20-r0 | 13.20-r0 | Fixed |
| alpine/postgresql13(Alpine v3.19) | < 13.20-r0 | 13.20-r0 | Fixed |
| alpine/postgresql14(Alpine v3.18) | < 14.17-r0 | 14.17-r0 | Fixed |
| alpine/postgresql14(Alpine v3.19) | < 14.17-r0 | 14.17-r0 | Fixed |
| alpine/postgresql14(Alpine v3.20) | < 14.17-r0 | 14.17-r0 | Fixed |
| alpine/postgresql15(Alpine v3.18) | < 15.11-r0 | 15.11-r0 | Fixed |
| alpine/postgresql15(Alpine v3.19) | < 15.11-r0 | 15.11-r0 | Fixed |
| alpine/postgresql15(Alpine v3.20) | < 15.11-r0 | 15.11-r0 | Fixed |
| alpine/postgresql15(Alpine v3.21) | < 15.11-r0 | 15.11-r0 | Fixed |
| alpine/postgresql15(Alpine v3.22) | < 15.11-r0 | 15.11-r0 | Fixed |
| alpine/postgresql16(Alpine v3.19) | < 16.8-r0 | 16.8-r0 | Fixed |
| alpine/postgresql16(Alpine v3.20) | < 16.8-r0 | 16.8-r0 | Fixed |
| alpine/postgresql16(Alpine v3.21) | < 16.8-r0 | 16.8-r0 | Fixed |
| alpine/postgresql16(Alpine v3.22) | < 16.8-r0 | 16.8-r0 | Fixed |
| alpine/postgresql16(Alpine v3.23) | < 16.8-r0 | 16.8-r0 | Fixed |
| alpine/postgresql16(Alpine v3.24) | < 16.8-r0 | 16.8-r0 | Fixed |
| alpine/postgresql17(Alpine v3.21) | < 17.4-r0 | 17.4-r0 | Fixed |
| alpine/postgresql17(Alpine v3.22) | < 17.4-r0 | 17.4-r0 | Fixed |
| alpine/postgresql17(Alpine v3.23) | < 17.4-r0 | 17.4-r0 | Fixed |
| alpine/postgresql17(Alpine v3.24) | < 17.4-r0 | 17.4-r0 | Fixed |
| azure linux postgresql(Azure Linux 3.0) | < 16.7-1 | 16.7-1 | Fixed |
| cbl-mariner postgresql(CBL-Mariner 2.0) | < 14.16-1 | 14.16-1 | Fixed |
| debian/postgresql-15(Debian 12) | < 15.11-0+deb12u1; = 15.3-0+deb12u1; = 15.3-1; = 15.4-0+deb12u1 +9 more | 15.11-0+deb12u1 | Fixed |
| debian/postgresql-17(Debian 13) | < 17.3-1 | 17.3-1 | Fixed |
| ubuntu/postgresql-14(Ubuntu 22.04) | < 14.17-0ubuntu0.22.04.1 | 14.17-0ubuntu0.22.04.1 | Fixed |
| ubuntu/postgresql-16(Ubuntu 24.04) | < 16.8-0ubuntu0.24.04.1 | 16.8-0ubuntu0.24.04.1 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| azure linux postgresql(Azure Linux:3.0) | < 16.7-1 | 16.7-1 |
| cbl-mariner postgresql(CBL-Mariner:2.0) | < 14.16-1 | 14.16-1 |
| debian/postgresql-15(Debian:12) | < 15.11-0+deb12u1 | 15.11-0+deb12u1 |
| debian/postgresql-15(Debian:12) | = 15.10-0+deb12u1 | No fix listed |
| debian/postgresql-15(Debian:12) | = 15.3-0+deb12u1 | No fix listed |
| debian/postgresql-15(Debian:12) | = 15.3-1 | No fix listed |
| debian/postgresql-15(Debian:12) | = 15.4-0+deb12u1 | No fix listed |
| debian/postgresql-15(Debian:12) | = 15.4-1 | No fix listed |
| debian/postgresql-15(Debian:12) | = 15.4-2 | No fix listed |
| debian/postgresql-15(Debian:12) | = 15.4-3 | No fix listed |
| debian/postgresql-15(Debian:12) | = 15.5-0+deb12u1 | No fix listed |
| debian/postgresql-15(Debian:12) | = 15.6-0+deb12u1 | No fix listed |
| debian/postgresql-15(Debian:12) | = 15.7-0+deb12u1 | No fix listed |
| debian/postgresql-15(Debian:12) | = 15.8-0+deb12u1 | No fix listed |
| debian/postgresql-15(Debian:12) | = 15.9-0+deb12u1 | No fix listed |
| debian/postgresql-17(Debian:13) | < 17.3-1 | 17.3-1 |
| ubuntu/postgresql-14(Ubuntu:22.04) | < 14.17-0ubuntu0.22.04.1 | 14.17-0ubuntu0.22.04.1 |
| alpine/postgresql13(Alpine:v3.18) | < 13.20-r0 | 13.20-r0 |
| alpine/postgresql13(Alpine:v3.19) | < 13.20-r0 | 13.20-r0 |
| alpine/postgresql14(Alpine:v3.18) | < 14.17-r0 | 14.17-r0 |
| alpine/postgresql14(Alpine:v3.19) | < 14.17-r0 | 14.17-r0 |
| alpine/postgresql14(Alpine:v3.20) | < 14.17-r0 | 14.17-r0 |
| alpine/postgresql15(Alpine:v3.18) | < 15.11-r0 | 15.11-r0 |
| alpine/postgresql15(Alpine:v3.19) | < 15.11-r0 | 15.11-r0 |
| alpine/postgresql15(Alpine:v3.20) | < 15.11-r0 | 15.11-r0 |
Show 13 more
| Product | Affected versions | Fixed in |
|---|---|---|
| alpine/postgresql15(Alpine:v3.21) | < 15.11-r0 | 15.11-r0 |
| alpine/postgresql15(Alpine:v3.22) | < 15.11-r0 | 15.11-r0 |
| alpine/postgresql16(Alpine:v3.19) | < 16.8-r0 | 16.8-r0 |
| alpine/postgresql16(Alpine:v3.20) | < 16.8-r0 | 16.8-r0 |
| alpine/postgresql16(Alpine:v3.21) | < 16.8-r0 | 16.8-r0 |
| alpine/postgresql16(Alpine:v3.22) | < 16.8-r0 | 16.8-r0 |
| alpine/postgresql16(Alpine:v3.23) | < 16.8-r0 | 16.8-r0 |
| alpine/postgresql16(Alpine:v3.24) | < 16.8-r0 | 16.8-r0 |
| alpine/postgresql17(Alpine:v3.21) | < 17.4-r0 | 17.4-r0 |
| alpine/postgresql17(Alpine:v3.22) | < 17.4-r0 | 17.4-r0 |
| alpine/postgresql17(Alpine:v3.23) | < 17.4-r0 | 17.4-r0 |
| alpine/postgresql17(Alpine:v3.24) | < 17.4-r0 | 17.4-r0 |
| ubuntu/postgresql-16(Ubuntu:24.04) | < 16.8-0ubuntu0.24.04.1 | 16.8-0ubuntu0.24.04.1 |
References
- Debian Security Tracker CVE-2025-1094 vendor-advisory
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- www.postgresql.org
- lists.debian.org
- www.openwall.com
- www.openwall.com
- lists.debian.org
- security.netapp.com
- Ubuntu CVE tracker vendor-advisory
- USN-7315-1 vendor-advisory
- USN-7315-2 vendor-advisory
- www.cve.org
- security.alpinelinux.org vendor-advisory
- ENISA EUVD EUVD-2025-1999 third-party-advisory