CVE-2019-9193
HighExploitedPublic exploitIn 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.
Published Apr 1, 2019 · Updated Nov 21, 2024
Key Facts
Patch immediately- CVE-2019-9193 is a high-severity vulnerability (CVSS 7.2 v3) affecting Postgresql, postgresql10-devel (photon), postgresql10 (photon) and 1 more product.
- It is exploited in the wild, listed in Industry KEV feed since Jan 22, 2021. Public exploit code is available.
- EPSS estimates a 92% probability of exploitation in the next 30 days.
- Fixed versions are available, including Postgresql NA, Postgresql <=11.2, postgresql10 NA.
- Brandefense priority: patch immediately, because it is listed as exploited in the wild.
CVSS v3
7.2
CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
EPSS (30-day exploit likelihood)
92%
Higher than 99.8% of all scored CVEs
Exploited in the wild
Yes
1 catalog listing
Public exploit code
Available
Proof-of-concept or weaponized module
Get the full CVE-2019-9193 brief as a PDF
Every affected product and fixed release, exploitation status and a first 24 hours response checklist, emailed within minutes.
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’.
Known-Exploited Catalog Listings
| Catalog | Added | Remediation due | Ransomware use |
|---|---|---|---|
| Industry KEV feed | Jan 22, 2021 | n/a | Not reported |
Required action: Apply remediations or mitigations per vendor instructions or discontinue use of the product if remediation or mitigations are unavailable.
Affected Products
7 affected entries in total| Product | Affected versions | Fixed in |
|---|---|---|
| PostgresqlPostgresql | See advisory | 11.2 |
| postgresql10-develphoton | See advisory | NA |
| postgresql10photon | See advisory | NA |
| postgresql10-libsphoton | See advisory | NA |
Patched Releases
Postgresql
NA, <=11.2
postgresql10
NA
postgresql10-devel
NA
postgresql10-libs
NA
Timeline
Publicly disclosed
Apr 1, 2019
Added to Industry KEV feed
Jan 22, 2021
Last updated
Nov 21, 2024
Weakness Type
- CWE-20 Improper Input Validation
- CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
References
- advisoryhttp://packetstormsecurity.com/files/152757/PostgreSQL-COPY-FROM-PROGRAM-Command-Execution.html
- advisoryhttps://blog.hagander.net/when-a-vulnerability-is-not-a-vulnerability-244/
- advisoryhttps://paquier.xyz/postgresql-2/postgres-9-3-feature-highlight-copy-tofrom-program/
- advisoryhttps://security.netapp.com/advisory/ntap-20190502-0003/
- advisoryhttps://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/authenticated-arbitrary-command-execution-on-postgresql-9-3/
FAQ
Common Questions.
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.
Affected: Postgresql; postgresql10-devel (photon); postgresql10 (photon), among others. The full list is in the CVE brief.
It is exploited in the wild, listed in Industry KEV feed since Jan 22, 2021.
No, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
Public exploit code is available.
Fixed versions are available, including Postgresql NA, Postgresql <=11.2, postgresql10 NA.
Brandefense priority: patch immediately, because it is listed as exploited in the wild.
Is CVE-2019-9193 Running On Your Attack Surface?
Brandefense maps vulnerabilities like this one to your internet-facing assets and tells you exactly where to patch.
Request A Demo