---
id: CVE-2025-1094
title: >-
  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 patter…
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 patter…
severity: high
cvss: 8.1
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-149
product: PostgreSQL
affected:
  - PostgreSQL >= 17 < 17.3
  - PostgreSQL >= 16 < 16.7
  - PostgreSQL >= 15 < 15.11
  - PostgreSQL >= 14 < 14.16
  - PostgreSQL < 13.19
published: '2025-02-13'
updated: '2026-11-03'
sourceUpdated: '2026-11-03T22:17:33.650'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2025-1094'
references:
  - url: 'https://www.postgresql.org/support/security/CVE-2025-1094/'
    label: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
  - url: 'http://www.openwall.com/lists/oss-security/2025/02/16/3'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://www.openwall.com/lists/oss-security/2025/02/20/1'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2025/02/msg00015.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2025/02/msg00024.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.netapp.com/advisory/ntap-20250221-0010/'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
  - cve.org
  - exploit-available
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2025-10-16T14:36:36.249886Z'
epss: 0.9003
epssPercentile: 0.99795
exploits:
  github: 6
  githubRepos:
    - 'https://github.com/soltanali0/CVE-2025-1094-Exploit'
    - 'https://github.com/ishwardeepp/CVE-2025-1094-PoC-Postgre-SQLi'
    - 'https://github.com/aninfosec/CVE-2025-1094'
  metasploit:
    - exploit/linux/http/beyondtrust_pra_rs_unauth_rce
  checkedAt: '2026-11-05T06:38:49.870Z'
exploitAvailable: true
ingestedAt: '2026-11-05T06:38:03.593Z'
---

## Overview

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

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
