Exploit database

Vulnerability

CVE-2019-9193

Vulnerability details

Score
7.2
Severity
high

CVSS 3.0 · NVD

Vector string

CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

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’.

CVE Program

Exploit source choices

11 sources
PostgreSQL COPY FROM PROGRAM Command Execution
MSF-multi--postgres--postgres_copy_from_program_cmd_execMetasploitLinux,OSX,Unix,Windows,Windows / remote

Installations running Postgres 9.3 and above have functionality which allows for the superuser and users with 'pg_execute_server_program' to pipe to and from an external program using COPY. This allows arbitrary command execution as though you have console access. This module attempts to create a new table, then execute system commands in the context of copying the command output into the table. This module should work on all Postgres systems running version 9.3 and above. For Linux & OSX systems, target 1 is used with cmd payloads such as: cmd/unix/reverse_perl For Windows Systems, target 2 is used with powershell payloads such as: cmd/windows/powershell_reverse_tcp Alternativly target 3 can be used to execute generic commands, such as a web_delivery meterpreter powershell payload or other customised command.

2019-03-20postgres_copy_from_program_cmd_exec.rb
ape1ron/davinci
GH-9631c3847cc1836933adc18fd5274f78GitHubUnofficial GitHub source

多组件客户端

2024-09-07113 files · 72 stars
b4kesn4ke/cve-2019-9193
GH-408b634428d17751d22bf53641d881c1GitHubUnofficial GitHub source

CVE-2019–9193 - PostgreSQL 9.3-12.3 Authenticated Remote Code Execution

2022-03-294 files · 23 stars
geniuszly/cve-2019-9193
GH-b213b27ecc3f86e4ec99894d767ce17bGitHubUnofficial GitHub source

is a PoC tool designed to exploit an authenticated Remote Code Execution (RCE) vulnerability in specific versions of PostgreSQL (9.3 - 11.7)

2024-10-064 files · 4 stars
wkjung0624/cve-2019-9193
GH-dc1546edcb3d2477d66d0a2d30b9fcd9GitHubUnofficial GitHub source

PostgreSQL Remote Code Executuon

2020-02-124 files · 3 stars
paulotrindadec/cve-2019-9193
GH-84fcb41013f043f3c74ed5d7b032f2acGitHubUnofficial GitHub source

paulotrindadec/cve-2019-9193 source repository

2023-02-014 files · 1 stars
addy-shetty/laazy_sqli-labs
GH-e87d3df29a145cea592974e58084fab1GitHubUnofficial GitHub source

addy-shetty/laazy_sqli-labs source repository

2025-04-076 files · 0 stars