CVE-2018-16850 json
postgresql before versions 11.1, 10.6 is vulnerable to a to SQL injection in pg_upgrade and pg_dump via CREATE TRIGGER ... REFERENCING.
published 2018-11-13 7 y ago modified 2026-06-17 4 mo ago also EUVD-2018-8644
- cvss
- 8.0
- version 3.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 5.1%
- EPSS 5.1% chance of exploitation in 30 days, percentile 92%
- public exploits
- 0
- none known
Summary
postgresql before versions 11.1, 10.6 is vulnerable to a to SQL injection in pg_upgrade and pg_dump via CREATE TRIGGER ... REFERENCING. Using a purpose-crafted trigger definition, an attacker can cause arbitrary SQL statements to run, with superuser privileges.
Patch / fix
- postgresql postgresql 10.6, 11.1
- postgresql-10 Ubuntu 18.04 LTS 10.6-0ubuntu0.18.04.1
ubuntu advisories UBUNTU-CVE-2018-16850
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- rh-postgresql10-postgresql RHEL 3 SOFTWARE_COLLECTIONS 10.6-1.el7
- rh-postgresql10-postgresql-libs RHEL 3 SOFTWARE_COLLECTIONS 10.6-1.el7
- rh-postgresql10-postgresql-test RHEL 3 SOFTWARE_COLLECTIONS 10.6-1.el7
- rh-postgresql10-postgresql-pltcl RHEL 3 SOFTWARE_COLLECTIONS 10.6-1.el7
- rh-postgresql10-postgresql-plperl RHEL 3 SOFTWARE_COLLECTIONS 10.6-1.el7
- rh-postgresql10-postgresql-server RHEL 3 SOFTWARE_COLLECTIONS 10.6-1.el7
- rh-postgresql10-postgresql-contrib RHEL 3 SOFTWARE_COLLECTIONS 10.6-1.el7
- rh-postgresql10-postgresql-plpython RHEL 3 SOFTWARE_COLLECTIONS 10.6-1.el7
red hat advisories RHSA-2018:3757
- postgresql10 SLES 12 SP4, SLES 12 SP3, SLED 12 SP4 +3 more 10.6-1.6.1
- postgresql10-libs SLES 12 SP4, SLES 12 SP3, SLED 12 SP4 +5 more 10.6-1.6.1
- postgresql10 SLE Module for Server Applications 15, SLE Module for Package Hub 15, SLE Module for Basesystem 15 10.6-4.8.1
suse advisories SUSE-SU-2018:3770-2SUSE-SU-2018:3942-1SUSE-SU-2018:3770-1
- postgresql10 openSUSE Tumbleweed 10.18-1.3
- postgresql11 openSUSE Tumbleweed 11.13-1.3
opensuse advisories openSUSE-SU-2024:11184-1openSUSE-SU-2024:11185-1
- postgresql Alpine 3.14, Alpine 3.13, Alpine 3.12 +3 more 11.1-r0
- postgresql14 Alpine 3.20, Alpine 3.19, Alpine 3.18 +3 more 11.1-r0
- postgresql15 Alpine 3.20, Alpine 3.19, Alpine 3.18 +1 more 11.1-r0
alpine advisories ALPINE-CVE-2018-16850
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
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-2018-16850 updated cvss 8.0
postgresql: SQL injection in pg_upgrade and pg_dump, via CREATE TRIGGER ... REFERENCING
-
Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-postgresql10-postgresql 10.6-1.el7, rh-postgresql10-postgresql-libs 10.6-1.el7, rh-postgresql10-postgresql-test 10.6-1.el7, rh-postgresql10-postgresql-pltcl 10.6-1.el7, rh-postgresql10-postgresql-plperl 10.6-1.el7, rh-postgresql10-postgresql-server 10.6-1.el7, +5 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) rh-postgresql10-postgresql 10.6-1.el7, rh-postgresql10-postgresql-libs 10.6-1.el7, rh-postgresql10-postgresql-test 10.6-1.el7, rh-postgresql10-postgresql-pltcl 10.6-1.el7, rh-postgresql10-postgresql-plperl 10.6-1.el7, rh-postgresql10-postgresql-server 10.6-1.el7, +5 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) rh-postgresql10-postgresql 10.6-1.el7, rh-postgresql10-postgresql-libs 10.6-1.el7, rh-postgresql10-postgresql-test 10.6-1.el7, rh-postgresql10-postgresql-pltcl 10.6-1.el7, rh-postgresql10-postgresql-plperl 10.6-1.el7, rh-postgresql10-postgresql-server 10.6-1.el7, +5 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-postgresql10-postgresql 10.6-1.el7, rh-postgresql10-postgresql-libs 10.6-1.el7, rh-postgresql10-postgresql-test 10.6-1.el7, rh-postgresql10-postgresql-pltcl 10.6-1.el7, rh-postgresql10-postgresql-plperl 10.6-1.el7, rh-postgresql10-postgresql-server 10.6-1.el7, +5 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-postgresql10-postgresql 10.6-1.el7, rh-postgresql10-postgresql-libs 10.6-1.el7, rh-postgresql10-postgresql-test 10.6-1.el7, rh-postgresql10-postgresql-pltcl 10.6-1.el7, rh-postgresql10-postgresql-plperl 10.6-1.el7, rh-postgresql10-postgresql-server 10.6-1.el7, +5 morefixed: vendor fix RHSA-2018:3757
-
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 morenot affected: vulnerable code not present
+3 more productsfewer
Red Hat Satellite 5 rh-postgresql95-postgresql Red Hat Software Collections rh-postgresql95-postgresql, rh-postgresql96-postgresql, rh-postgresql95-postgresql-libs, rh-postgresql95-postgresql-test, rh-postgresql96-postgresql-libs, rh-postgresql96-postgresql-test, +13 more Red Hat Virtualization 4 postgresql, rh-postgresql95-postgresql, rh-postgresql95-postgresql-libs, rh-postgresql95-postgresql-test, rh-postgresql95-postgresql-pltcl, rh-postgresql95-postgresql-plperl, +3 more
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
Exploit prediction
5.15% chance of exploitation in the next 30 days, higher than 92% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.0 | 8.0 | CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected products
- The PostgreSQL Project postgresql
Classification
- Weakness
-
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
- Technology feeds
References
-
bugzilla.redhat.com
/show_bug.cgi?id=CVE-2018-16850
issue-tracking, patch, third-party-advisory
-
usn.ubuntu.com
/3818-1/
vendor-advisory, third-party-advisory
-
access.redhat.com
/errata/RHSA-2018:3757
vendor-advisory, third-party-advisory
-
security.gentoo.org
/glsa/201811-24
vendor-advisory, mitigation, third-party-advisory
-
postgresql.org
/about/news/1905/
release-notes, vendor-advisory
-
securitytracker.com
/id/1042144
vdb-entry, third-party-advisory
-
securityfocus.com
/bid/105923
vdb-entry, third-party-advisory
Sources
- CVE List CVE-2018-16850
- NVD CVE-2018-16850
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.