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
- Oct 16, 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)
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.