PostgreSQL < 17.3, 16.7, 15.11, 14.16, 13.19 - SQL Injection via libpq Quoting Functions
Title source: llmExploitation Summary
CVE-2025-1094 has been observed exploited in the wild (reported by VulnCheck KEV).
EIP tracks 8 public exploits from researchers including soltanali0, ishwardeepp, Nguyen-Van-Gia-Binh, including a Metasploit module exploits/linux/http/beyondtrust_pra_rs_command_injection.
AI-analyzed exploit summary This PoC exploits CVE-2025-1094, a PostgreSQL SQL injection vulnerability that escalates to RCE via WebSocket hijacking. It demonstrates file exfiltration and reverse shell execution.
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.
Exploits (8)
This PoC exploits CVE-2025-1094, a PostgreSQL SQL injection vulnerability that escalates to RCE via WebSocket hijacking. It demonstrates file exfiltration and reverse shell execution.
This repository contains a working proof-of-concept for CVE-2025-1094, a SQL injection vulnerability in PostgreSQL versions prior to 17.3, 16.7, 15.11, 14.16, and 13.19. The exploit leverages an encoding mismatch between client and server to execute arbitrary SQL commands, including reading sensitive files like /etc/passwd.
This repository contains a functional PoC for CVE-2025-1094, demonstrating a PostgreSQL multi-byte SQL injection vulnerability in the `pg-native` Node.js library when using older versions of `libpq` with multi-byte character encodings like BIG5 or EUC_TW.
This repository contains a functional exploit PoC for CVE-2025-1094, demonstrating a SQL injection vulnerability in PostgreSQL's libpq and psql that can lead to RCE. The exploit leverages a multibyte UTF-8 handling flaw to bypass escaping mechanisms and execute arbitrary shell commands via psql meta-commands.
This repository contains a functional exploit for CVE-2025-1094, targeting PostgreSQL's psql tool via malformed UTF-8 input to achieve SQL injection and remote code execution using the COPY TO PROGRAM feature.
This PoC exploits CVE-2025-1094, a PostgreSQL input sanitization vulnerability in BIG5 encoding, to achieve SQL injection and potentially RCE via COPY TO PROGRAM. It demonstrates how improperly sanitized input can bypass query boundaries and execute arbitrary commands.
This Metasploit module exploits an unauthenticated remote code execution vulnerability in BeyondTrust Privileged Remote Access (PRA) and Remote Support (RS) by leveraging command injection via WebSocket communication. It targets versions 25.3.1 and prior for RS and 24.3.4 and prior for PRA.
This Metasploit module exploits an unauthenticated RCE vulnerability in BeyondTrust PRA/RS (versions ≤ 24.3.1) by leveraging argument injection (CVE-2024-12356) and SQL injection (CVE-2025-1094) via WebSocket communication. It includes checks for target version and site discovery.
References (6)
Scores
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H