CVE-2018-16850: SQL Injection
Last updated 25 August 2025
Other sources
Postgresql before versions 11.1 and 10.6 are vulnerable to SQL injection in pgupgrade and pgdump via CREATE TRIGGER ... REFERENCING. Using a purpose-crafted trigger definition, an attacker can cause arbitrary SQL statements to run, with superuser privileges, during the next pgupgrade of the database or the next pgdump dump/restore cycle. The attack requires CREATE privilege on some non-temporary schema or TRIGGER privilege on some table. This is exploitable in the default configuration, where all users have CREATE privilege on schema "public".
— Red Hat
postgresql before versions 11.1, 10.6 is vulnerable to a to SQL injection in pgupgrade and pgdump via CREATE TRIGGER ... REFERENCING. Using a purpose-crafted trigger definition, an attacker can cause arbitrary SQL statements to run, with superuser privileges.
— Launchpad
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2018-16850?
The severity of CVE-2018-16850 is critical with a CVSS score of 9.8.
How does CVE-2018-16850 affect PostgreSQL?
CVE-2018-16850 affects PostgreSQL versions before 11.1 and 10.6.
How can an attacker exploit CVE-2018-16850?
An attacker can exploit CVE-2018-16850 by using a purpose-crafted trigger definition to cause arbitrary SQL statements to run with superuser privileges.
Which software packages are affected by CVE-2018-16850?
Software packages affected by CVE-2018-16850 include PostgreSQL versions before 11.1 and 10.6, as well as Redhat Enterprise Linux and Canonical Ubuntu Linux.
Where can I find more information about CVE-2018-16850?
More information about CVE-2018-16850 can be found at the following references: [Bugzilla Redhat](https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16850), [PostgreSQL News](https://www.postgresql.org/about/news/1905/), [Ubuntu Security Notices](https://usn.ubuntu.com/3818-1/)