Skip to main content
← All vulnerabilities
CVE-2025-1094

PostgreSQL quoting APIs miss neutralizing quoting syntax in text that fails encoding validation

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 17.3, 16.7, 15.11, 14.16, 13.19
1 Metasploit module, 6 proofs of concept on GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: total

Summary

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

  1. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: total

  2. CVE published
  3. Record last updated
  4. EPSS reached 10%

    FIRST estimates at least a 10% chance of exploitation in the next 30 days

Affected versions

  • n/a PostgreSQL

    From 17 · fixed in 17.3; From 16 · fixed in 16.7; From 15 · fixed in 15.11; From 14 · fixed in 14.16; fixed in 13.19

References 8

postgresql.org

GitHub · rapid7/metasploit-framework

GitHub · PinkArmor/CVE-2025-1094-Lab-Setup

GitHub · TranDongA3/POC-CVE-2025-1094

GitHub · aninfosec/CVE-2025-1094

GitHub · ishwardeepp/CVE-2025-1094-PoC-Postgre-SQLi

GitHub · skraft9/CVE-2024-12356

GitHub · soltanali0/CVE-2025-1094-Exploit