CVE-2025-1094

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

State
Published
Severity
8.1 High
Published
Feb 13, 2025
Updated
Mar 14, 2025
Reserved
Feb 6, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.18.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HPostgreSQL

Weaknesses

  • CWE-149 Improper Neutralization of Quoting Syntax

Affected Products

ProductVersions
PostgreSQLn/a
  • 17 to before 17.3Affected
  • 16 to before 16.7Affected
  • 15 to before 15.11Affected
  • 14 to before 14.16Affected
  • before 13.19Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.