CVE-2018-16850

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.

Published: 2018-11-13 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2018-16850 is rated High Risk (67.9/100): CVSS Critical severity, with medium exploitation likelihood (EPSS 1.32%). Mandatory action: High exploitation likelihood—assess exposure and prioritize remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2018-16850

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-03-04 0.50% 1.32% +0.82%
2 2026-03-01 1.32% 0.50% -0.82%
3 2026-02-04 1.32%

Full EPSS history (45 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2018-16850

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
9.8 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 5.9 [email protected]
8.0 3.0 HIGH
CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.1 5.9 [email protected]
7.5 2.0 HIGH
AV:N/AC:L/Au:N/C:P/I:P/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:L)
Exploitation conditions are straightforward and predictable.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
10.0 6.4 [email protected]

Weakness enumeration for CVE-2018-16850

OS Trackers for CVE-2018-16850

vendor priority summary link
alpine critical CVE-2018-16850: 3 source package rows (postgresql, postgresql14, postgresql15); 23 state rows across 11 repos (3.10-main, 3.11-main, 3.12-main, 3.17-main, 3.18-main, 3.19-community, 3.19-main, 3.20-community, 3.20-main, edge-community, edge-main); fixed 16, open 7. https://security.alpinelinux.org/vuln/CVE-2018-16850
gentoo normal CVE-2018-16850: 1 GLSA(s) (201811-24), 1 atom(s) (dev-db/postgresql); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2018-16850
redhat high https://access.redhat.com/security/cve/CVE-2018-16850
ubuntu medium CVE-2018-16850 medium priority: Ubuntu including 4 source packages (postgresql-10, postgresql-9.1, postgresql-9.3, postgresql-9.5), 20 status rows across 5 suites (bionic, cosmic, trusty, upstream, xenial): DNE 12, not-affected 5, released 3. https://ubuntu.com/security/CVE-2018-16850

Affected software / configurations for CVE-2018-16850

Vendor Product Version Raw CPE
postgresql postgresql >= 10.0, < 10.6 cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
postgresql postgresql >= 11.0, < 11.1 cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
redhat enterprise_linux 7.0 cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*
redhat enterprise_linux 7.4 cpe:2.3:o:redhat:enterprise_linux:7.4:*:*:*:*:*:*:*
redhat enterprise_linux 7.5 cpe:2.3:o:redhat:enterprise_linux:7.5:*:*:*:*:*:*:*
redhat enterprise_linux 7.6 cpe:2.3:o:redhat:enterprise_linux:7.6:*:*:*:*:*:*:*
canonical ubuntu_linux 18.04 cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*
canonical ubuntu_linux 18.10 cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*

References for CVE-2018-16850

URL Tags
http://www.securityfocus.com/bid/105923 Third Party Advisory VDB Entry
http://www.securitytracker.com/id/1042144 Third Party Advisory VDB Entry
https://access.redhat.com/errata/RHSA-2018:3757 Third Party Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16850 Issue Tracking Patch Third Party Advisory
https://security.gentoo.org/glsa/201811-24 Mitigation Third Party Advisory
https://usn.ubuntu.com/3818-1/ Third Party Advisory
https://www.postgresql.org/about/news/1905/ Release Notes Vendor Advisory
cvelogic Threat Intelligence