CVE-2025-1094

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

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.

Remediation

Workaround:

  • Confirm input passes encoding validation before quoting it.

Category

8.1
CVSS
Severity: High
CVSS 3.1 •
EPSS 82.02% Top 5%
Affected: n/a PostgreSQL
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2025-1094?
CVE-2025-1094 has been scored as a high severity vulnerability.
How to fix CVE-2025-1094?
As a workaround for remediating CVE-2025-1094: Confirm input passes encoding validation before quoting it.
Is CVE-2025-1094 being actively exploited in the wild?
It is possible that CVE-2025-1094 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~82% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2025-1094?
CVE-2025-1094 affects n/a PostgreSQL.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.