CVE-2019-9193
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...
- Published
- Apr 1, 2019
- Updated
- Nov 15, 2024
- Assigning CNA
- mitre
- Evidence observed
- May 8, 2019
Primary CVSS
nvd · CVSS 2.0
AV:N/AC:L/Au:S/C:C/I:C/A:CHigh · next 30 days
- Percentile
- 99.8%
- Model date
- Nov 7, 2026
EPSS is a statistical estimate, not a certainty or a measure of impact. Combine it with CVSS, KEV status, exposure and your environment.
Summary
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’.
Sources
postgres/CVE-2019-9193
PostgreSQL Arbitrary Command Execution with Admin Privileges (CVE-2019-9193)
Vulhub vulnerability labsDeclared conditions
- lab image version: vulhub/postgres:10.7(postgres/CVE-2019-9193/docker-compose.yml:services.postgres.image)
modules/exploits/multi/postgres/postgres_copy_from_program_cmd_exec.rb
Metasploit Framework modulesDeclared conditions
- platform: Linux,OSX,Unix,Windows,Windows($.exploit_multi/postgres/postgres_copy_from_program_cmd_exec.platform)
- verification: check_declared($.exploit_multi/postgres/postgres_copy_from_program_cmd_exec.check)
javascript/cves/2019/CVE-2019-9193.yaml
Nuclei TemplatesDeclared conditions
- verification: regex,word($.matchers[*].type)
CVE-2019–9193 - PostgreSQL 9.3-12.3 Authenticated Remote Code Execution
- CVE-2019-9193-Postgresql-RCEExploit
Python exploit script for CVE-2019-9193, enabling remote code execution on vulnerable PostgreSQL databases via authenticated command injection.
- CVE-2019-9193Exploit
is a PoC tool designed to exploit an authenticated Remote Code Execution (RCE) vulnerability in specific versions of PostgreSQL (9.3 - 11.7)
- CVE-2019-9193-Home-LabResearch
This lab simulates CVE-2019-9193 - PostgreSQL COPY FROM PROGRAM RCE
Proof-of-concept exploit for authenticated remote code execution in PostgreSQL 9.6.1, demonstrating how misconfigured databases can be leveraged for system access.
PoC tool designed to exploit an authenticated Remote Code Execution (RCE) vulnerability in certain versions of PostgreSQL (9.3 - 11.7)
Docker-based lab demonstrating CVE-2019-9193 PostgreSQL arbitrary command execution via COPY FROM PROGRAM, with step-by-step PoC for security testing and education.
- cve-2019-9193Exploit
PostgreSQL Remote Code Executuon
Metasploit · multiple · May 8, 2019
Responsible use
Use vulnerability information only on systems you own or are authorized to test. Kitploit links to public research metadata and does not store exploit code or malicious payloads.