Skip to content
Fencer Vulns
high 7.2

CVE-2019-9193 in the critical feed json

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…

published 2019-04-01 7 y ago modified 2026-06-17 4 mo ago also EUVD-2019-18570

cvss
7.2
version 3.0, NVD
cisa kev
Not listed
not in CISA's catalog
epss
91.7%
EPSS 91.7% chance of exploitation in 30 days, percentile 99.8%
public exploits
4
Metasploit, Exploit-DB, plus a Nuclei check

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

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2019-9193 updated cvss 0.0

postgresql: Command injection via "COPY TO/FROM PROGRAM" function

  • Red Hat CloudForms Management Engine 5 postgresql96, postgresql96-libs, postgresql96-test, postgresql96-pltcl, postgresql96-plperl, postgresql96-server, +2 more Red Hat Ansible Tower 3 postgresql96-libs Red Hat Enterprise Linux 5 postgresql Red Hat Enterprise Linux 6 postgresql, postgresql-libs, postgresql-test, postgresql-pltcl, postgresql-plperl, postgresql-server, +2 more Red Hat Enterprise Linux 7 postgresql, postgresql-libs, postgresql-test, postgresql-pltcl, postgresql-plperl, postgresql-server, +3 more Red Hat Enterprise Linux 8 libpq, pgaudit, pg_repack, postgresql, postgresql-test, postgresql-pltcl, +8 more
    +2 more products
    Red Hat Satellite 5 rh-postgresql95-postgresql Red Hat Software Collections rh-postgresql10-postgresql, rh-postgresql95-postgresql, rh-postgresql96-postgresql, rh-postgresql10-postgresql-libs, rh-postgresql10-postgresql-test, rh-postgresql95-postgresql-libs, +24 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Timeline

  1. First public exploit (Metasploit exploit/multi/postgres/postgres_copy_from_program_cmd_exec)
  2. Published

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
2 y ago

Exploit prediction

91.66% chance of exploitation in the next 30 days, higher than 99.8% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • Metasploit exploit/multi/postgres/postgres_copy_from_program_cmd_exec PostgreSQL COPY FROM PROGRAM Command Execution metasploit exploit, excellent rank, 2019-03-20
  • EDB-51247 PostgreSQL 9.6.1 - Remote Code Execution (RCE) (Authenticated) remote, 2023-04-05
  • EDB-50847 PostgreSQL 9.3-11.7 - Remote Code Execution (RCE) (Authenticated) remote, 2022-03-30
  • EDB-46813 PostgreSQL 9.3 - COPY FROM PROGRAM Command Execution (Metasploit) remote, 2019-05-08
  • Nuclei template PostgreSQL 9.3-12.3 Authenticated Remote Code Execution nuclei detection template
  • medium.com https://medium.com/greenwolf-security/authenticated-arbitrary-command-execution-on-postgresql-9-3-latest-cd18945914d5 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.0 7.2 CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 9.0 AV:N/AC:L/Au:S/C:C/I:C/A:C

Classification

Weakness
  • CWE-78 Improper Neutralization of Special Elements used in an OS Command
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.