CVE-2025-1094
PostgreSQL quoting APIs miss neutralizing quoting syntax in text that fails encoding validation
A public proof of concept exists; no exploitation attested.
- Published2025-02-13
- Fixed in17.3.0 · 16.7.0 · 15.11.0 · 14.16.0 · 13.19.0
- WeaknessCWE-149
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2025-02-1313:00CVE publishedCNA
- 2025-02-1313:15CVE publishedNVD
Versions per branch
OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 17.x | ≥ 17.0.0, < 17.3.0 | 17.3.0 | OSV |
| 16.x | ≥ 16.0.0, < 16.7.0 | 16.7.0 | OSV |
| 15.x | ≥ 15.0.0, < 15.11.0 | 15.11.0 | OSV |
| 14.x | ≥ 14.0.0, < 14.16.0 | 14.16.0 | OSV |
| 13.19 | < 13.19.0 | 13.19.0 | OSV |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Products declared by the CNA1 product
As PostgreSQL, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- PostgreSQLother versions: not affectedAffected
- ≥ 17, < 17.3fixed in 17.3rpm
- ≥ 16, < 16.7fixed in 16.7rpm
- ≥ 15, < 15.11fixed in 15.11rpm
- ≥ 14, < 14.16fixed in 14.16rpm
- < 13.19fixed in 13.19rpm
Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2025-02-13
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- libpqTuxCare:AlmaLinux:9.2all versions · fixed in 13.5-1.el9.tuxcare.els1and 1 other package
- libpqRocky Linux:9all versions · fixed in 0:13.20-1.el9_5and 1 other package
- libpqRocky Linux:8all versions · fixed in 0:13.20-1.el8_10
- libpqRed Hat:rhel_eus:8.8::appstreamall versions · fixed in 0:13.20-1.el8_8and 4 other packages
- libpqRed Hat:rhel_e4s:8.6::appstreamall versions · fixed in 0:13.20-1.el8_6and 4 other packages
- libpqRed Hat:rhel_e4s:8.4::appstreamall versions · fixed in 0:13.20-1.el8_4and 4 other packages
- libpqRed Hat:rhel_aus:8.6::appstreamall versions · fixed in 0:13.20-1.el8_6and 4 other packages
- libpqRed Hat:rhel_aus:8.4::appstreamall versions · fixed in 0:13.20-1.el8_4and 4 other packages
269 more package ranges on OSV.dev
Vendor advisories
postgresql: PostgreSQL quoting APIs miss neutralizing quoting syntax in text that fails encoding validation
postgresql as a component of Red Hat Enterprise Linux 6 · postgresql-contrib as a component of Red Hat Enterprise Linux 6 · postgresql-devel as a component of Red Hat Enterprise Linux 6 · +8 more
Red Hat Security Advisory: postgresql security update
Red Hat Security Advisory: postgresql:12 security update
Red Hat Security Advisory: postgresql:12 security update
Red Hat Security Advisory: postgresql:12 security update
Red Hat Security Advisory: postgresql:12 security update
26 more advisories
Fix
- Update postgresql to 17.3.0 · 16.7.0 · 15.11.0 · 14.16.0 · 13.19.0
- Vendor fix Red Hat Product Security RHSA-2025:3978 · 75 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
- Workaround from the vendor Red Hat Product Security RHSA-2025:3978 · 75 productsTo mitigate, apply PostgreSQL patches once available. Until then: 1. Validate UTF-8 encoding: Reject inputs containing invalid UTF-8 sequences before passing to psql. 2. Avoid dynamic SQL: Use parameterized queries or ORM frameworks to minimize direct psql usage with raw input. 3. Restrict psql pr…
Detection
read 2026-11-14 10:42 UTC- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHub6 repositories, unverifiedknown since 2026-11-14soltanali0/CVE-2025-1094-Exploitishwardeepp/CVE-2025-1094-PoC-Postgre-SQLianinfosec/CVE-2025-1094PinkArmor/CVE-2025-1094-Lab-SetupTranDongA3/POC-CVE-2025-1094
- Metasploit modules
- 1 moduleexploit/linux/http/beyondtrust_pra_rs_unauth_rcerank: excellentModule metadata: Metasploit Framework, © Rapid7, Inc., BSD-3-Clause. Metasploit Framework
Sources
- NVDCVE recordread 2026-11-03
- CISA-ADPSSVC decisionnone2025-10-16
- CNACVSS 3.18.12025-02-13
- CNAweakness (CWE)CWE-1492025-02-13
- FIRST EPSSEPSS score90.0 %read 2026-11-18
- PoC-in-GitHubproof of concept6known since 2026-11-14
- Metasploit FrameworkMetasploit modules1known since 2026-11-01
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- AZL-56732same flawAzure Linux · MIT
- AZL-56791same flawAzure Linux · MIT
- BIT-postgresql-2025-1094same flawBitnami · Apache-2.0
- CGA-2h2m-c3w3-8c26same flawChainguard · CC-BY-NC-ND-4.0
- CGA-3j5q-q255-9f9xsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-3qm8-5p99-hhfmsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-6m3g-h78w-6mpqsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-6v4g-94x3-p4gqsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-7rf2-229q-h76wsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-8jpm-vg85-xfw8same flawChainguard · CC-BY-NC-ND-4.0
- CGA-98q6-r69j-p28qsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-g42m-r398-x8w5same flawChainguard · CC-BY-NC-ND-4.0
- CGA-h6g5-gvx5-jxh3same flawChainguard · CC-BY-NC-ND-4.0
- CGA-hv4r-gpvj-gwc4same flawChainguard · CC-BY-NC-ND-4.0
- CGA-r24r-2pf4-h6xmsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-v74p-fqwf-pjvrsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-v87w-2jhr-xc3wsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-x7vm-h6p9-cj72same flawChainguard · CC-BY-NC-ND-4.0
- EUVD-2025-1999same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-mhw9-x46c-v6q4same flawGitHub Advisory Database · CC-BY-4.0
- MINI-37m4-7jc9-882vsame flawMinimOS · LicenseRef-unstated
- MINI-4jfr-pvvr-xx6hsame flawMinimOS · LicenseRef-unstated
- MINI-jm43-hwm4-rgm8same flawMinimOS · LicenseRef-unstated
- MINI-w7m6-fc7p-6j27same flawMinimOS · LicenseRef-unstated
- MINI-xmrh-g664-jm25same flawMinimOS · LicenseRef-unstated
- exploit/linux/http/beyondtrust_pra_rs_unauth_rceexploit moduleMetasploit Framework © Rapid7 · BSD-3-Clause
- ALSA-2025:1736advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:1737advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:1738advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:1739advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:1740advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:1741advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:1742advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:1743advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:3082advisory covering several CVEsAlmaLinux · MIT
- DLA-4052-1advisory covering several CVEsDebian · LicenseRef-unstated
- DLA-4052-2advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2025-0064advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2025-1152advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1153advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1154advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1155advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1227advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1228advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1229advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1230advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1335advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2025:14805-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2025:14806-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2025:14807-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Published
- 2025-02-13
- Last Modified
- 2026-11-03
- NVD status
- Deferred
- GitHub Advisory
- GHSA-mhw9-x46c-v6q4
Frequently asked questions
What is CVE-2025-1094?
Is CVE-2025-1094 actively exploited?
What is the CVSS score for CVE-2025-1094?
Running PostgreSQL? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-mhw9-x46c-v6q4
- Metasploit Framework · BSD-3-Clause
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- PoC-in-GitHub · CC0-1.0
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0