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 ...
Critical CVSS 9.8
- CVE id
- CVE-2018-16850
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| PostgreSQL Runtimes and servers |
>= 10.0, < 10.6 >= 11.0, < 11.1 |
10.6, 11.1 |
How to fix it
Upgrade PostgreSQL to the fixed release of the line you run: 10.6, 11.1.
psql -c 'SELECT version();'
- Install the patched PostgreSQL minor release of your major version (the postgres image tag, the PGDG packages, or your provider's maintenance update) and restart the server; minor releases need no dump or pg_upgrade.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
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.
References
- CVE-2018-16850 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2018-16850
- Web: https://access.redhat.com/errata/RHSA-2018:3757
- Web: https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16850
- Web: https://security.gentoo.org/glsa/201811-24
- Web: https://usn.ubuntu.com/3818-1/
- Web: https://www.postgresql.org/about/news/1905/
- Web: https://access.redhat.com/errata/RHSA-2018:3757
- Web: https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16850
- Web: https://security.gentoo.org/glsa/201811-24
- Web: https://usn.ubuntu.com/3818-1/
- Web: https://www.postgresql.org/about/news/1905/
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.