CVE-2019-9193
HIGH EXPLOITED IN THE WILD NUCLEIPostgreSQL 9.3-11.2 - Authenticated OS Command Injection via COPY TO/FROM PROGRAM
Title source: llmExploitation Summary
CVE-2019-9193 has been observed exploited in the wild (reported by VulnCheck KEV, InTheWild.io).
EIP tracks 13 public exploits from researchers including Metasploit, Paulo Trindade, b4keSn4ke, including a Metasploit module exploits/multi/postgres/postgres_copy_from_program_cmd_exec.
A Nuclei detection template is also available.
AI-analyzed exploit summary This Metasploit module exploits CVE-2019-9193 by leveraging PostgreSQL's COPY FROM PROGRAM functionality to execute arbitrary commands. It creates a table, copies command output into it, and supports multiple platforms (Unix, Windows, OSX).
Description
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_server_program' group to execute arbitrary code in the context of the database's operating system user. This functionality is enabled by default and can be abused to run arbitrary operating system commands on Windows, Linux, and macOS. NOTE: Third parties claim/state this is not an issue because PostgreSQL functionality for ‘COPY TO/FROM PROGRAM’ is acting as intended. References state that in PostgreSQL, a superuser can execute commands as the server user without using the ‘COPY FROM PROGRAM’.
Exploits (13)
This Metasploit module exploits CVE-2019-9193 by leveraging PostgreSQL's COPY FROM PROGRAM functionality to execute arbitrary commands. It creates a table, copies command output into it, and supports multiple platforms (Unix, Windows, OSX).
This exploit leverages PostgreSQL's COPY FROM PROGRAM feature to execute arbitrary system commands via a trigger-based payload. It requires authentication and demonstrates RCE by creating a table, function, and trigger to execute the provided command.
This exploit leverages PostgreSQL's COPY FROM PROGRAM feature to execute arbitrary system commands via authenticated SQL queries. It creates a temporary table, executes the command, and retrieves the output, demonstrating RCE in PostgreSQL versions 9.3-11.7.
This is a functional exploit for CVE-2019-9193, leveraging PostgreSQL's COPY FROM PROGRAM feature to execute arbitrary system commands. It requires authentication and creates a temporary table to capture command output.
This is a functional exploit for CVE-2019-9193, leveraging PostgreSQL's COPY FROM PROGRAM feature to execute arbitrary system commands on vulnerable versions (9.3-11.7). It includes version checking, temporary table management, and command execution via authenticated PostgreSQL sessions.
This PoC exploits CVE-2019-9193 in PostgreSQL by leveraging the 'COPY TO/FROM PROGRAM' feature to execute arbitrary commands, establishing a reverse shell. It requires superuser or 'pg_execute_server_program' privileges.
This is a functional exploit for CVE-2019-9193, leveraging PostgreSQL's COPY FROM PROGRAM feature to execute arbitrary system commands via a trigger. It requires authentication and demonstrates RCE by creating a table, function, and trigger to execute the provided command.
This is a functional exploit for CVE-2019-9193, leveraging PostgreSQL's COPY FROM PROGRAM feature to execute arbitrary system commands. It requires authentication and targets PostgreSQL versions 9.3 to 11.7.
This repository provides a functional proof-of-concept for CVE-2019-9193, demonstrating how PostgreSQL's COPY FROM PROGRAM feature can be exploited for remote command execution (RCE) by superusers or users with the pg_execute_server_program role. The lab includes a Dockerized environment and step-by-step instructions to read a flag file via OS command injection.
This repository provides a working proof-of-concept for CVE-2019-9193, a PostgreSQL vulnerability allowing arbitrary command execution via the COPY FROM PROGRAM feature. It includes setup instructions and exploit steps for versions 9.3 to 11.
This is a functional exploit for CVE-2019-9193, leveraging PostgreSQL's COPY FROM PROGRAM feature to execute arbitrary system commands on vulnerable PostgreSQL servers (9.3-11.7). It includes version checking and automated table management for command execution.
This is a functional exploit for CVE-2019-9193, leveraging PostgreSQL's COPY FROM PROGRAM feature to execute arbitrary commands on the server. It establishes an authenticated connection and provides a pseudo-shell for command execution.
This Metasploit module exploits PostgreSQL's COPY FROM PROGRAM functionality to execute arbitrary commands via authenticated SQL queries. It creates a table, executes a payload via COPY, and optionally dumps output for debugging.
Nuclei Templates (1)
product:"PostgreSQL"
References (8)
Scores
CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H