PostgreSQL Arbitrary Code Execution Vulnerability (CVE-2019-9193) Threat Alert

PostgreSQL Arbitrary Code Execution Vulnerability (CVE-2019-9193) Threat Alert

abril 1, 2019 | Adeline Zhang

1 Vulnerability Overview

Recently, a security researcher disclosed details about a PostgreSQL privilege escalation code execution vulnerability (CVE-2019-9193), which allows attackers with read access to database server-side files to execute arbitrary system commands.

PostgreSQL, as a powerful database software program, can run on all mainstream operating systems, including Linux, Windows, and Mac OS X. The vulnerability in question exists in the data import/export command COPY TO/FROM PROGRAM. A user in the pg_read_server_files group, after running this command, can gain database superuser privileges and further execute arbitrary system commands.

Reference link:

2 Scope of Impact

  • Affected Versions
  • PostgreSQL >=9.3

3 Recommended Solution

pg_read_server_files, pg_write_server_files, and pg_execute_server_program roles are so privileged as to be able to read from/write to database server-side files. Therefore, one should exercise caution when granting roles to database users.

3.1 Protection with Security Products

Currently, no official plan has been made to fix this vulnerability. NSFOCUS Network Intrusion Prevention System (NIPS) will include a related rule in the routine update. Users are advised to load the update as soon as it is available to protect against this vulnerability. After the update is installed, users can search the default rule base for the rule by ID 41660 and view its details.


  • Statement

This advisory is only used to describe a potential risk. NSFOCUS does not provide any commitment or promise on this advisory. NSFOCUS and the author will not bear any liability for any direct and/or indirect consequences and losses caused by transmitting and/or using this advisory. NSFOCUS reserves all the rights to modify and interpret this advisory. Please include this statement paragraph when reproducing or transferring this advisory. Do not modify this advisory, add/delete any information to/from it, or use this advisory for commercial purposes without permission from NSFOCUS.

  • About NSFOCUS

NSFOCUS IB is a wholly owned subsidiary of NSFOCUS, an enterprise application and network security provider, with operations in the Americas, Europe, the Middle East, Southeast Asia and Japan. NSFOCUS IB has a proven track record of combatting the increasingly complex cyber threat landscape through the construction and implementation of multi-layered defense systems. The company’s Intelligent Hybrid Security strategy utilizes both cloud and on-premises security platforms, built on a foundation of real-time global threat intelligence, to provide unified, multi-layer protection from advanced cyber threats.

For more information about NSFOCUS, please visit:

NSFOCUS, NSFOCUS IB, and NSFOCUS, INC. are trademarks or registered trademarks of NSFOCUS, Inc. All other names and trademarks are property of their respective firms.