postgresql: SQL injection in pg_upgrade and pg_dump, via CREATE TRIGGER ... REFERENCING
Published Nov 13, 2018
9.8
CRITICALCVSS 3.1
EPSS 5.15%
Description
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.
Affected products
-
- Version 10.6StatusaffectedConstraints-
- Version 11.1StatusaffectedConstraints-
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| The PostgreSQL Project | PostgreSQL | n/a |
|
Configuration 1
- ≥ 10.0 · < 10.6
- ≥ 11.0 · < 11.1
Configuration 2
- 7.0
- 7.4
- 7.5
- 7.6
Configuration 3
- 18.04
- 18.10
No data.
Red Hat Software Collections for Red Hat Enterprise Linux 7
rh-postgresql10-postgresql-0:10.6-1.el7
Fixed · RHSA-2018:3757
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
rh-postgresql10-postgresql-0:10.6-1.el7
Fixed · RHSA-2018:3757
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
rh-postgresql10-postgresql-0:10.6-1.el7
Fixed · RHSA-2018:3757
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS
rh-postgresql10-postgresql-0:10.6-1.el7
Fixed · RHSA-2018:3757
CloudForms Management Engine 5
postgresql96
Not affected
Red Hat Ansible Tower 3
postgresql96-libs
Not affected
Red Hat Enterprise Linux 5
postgresql
Not affected
Red Hat Enterprise Linux 6
postgresql
Not affected
Red Hat Enterprise Linux 7
postgresql
Not affected
Red Hat Enterprise Linux 8
libpq
Not affected
Red Hat Enterprise Linux 8
postgresql
Not affected
Red Hat Satellite 5
rh-postgresql95-postgresql
Not affected
Red Hat Software Collections
rh-postgresql95-postgresql
Not affected
Red Hat Software Collections
rh-postgresql96-postgresql
Not affected
Red Hat Virtualization 4
postgresql
Not affected
Red Hat Virtualization 4
rh-postgresql95-postgresql
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-postgresql10-postgresql-0:10.6-1.el7 | Fixed | RHSA-2018:3757 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS | rh-postgresql10-postgresql-0:10.6-1.el7 | Fixed | RHSA-2018:3757 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS | rh-postgresql10-postgresql-0:10.6-1.el7 | Fixed | RHSA-2018:3757 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS | rh-postgresql10-postgresql-0:10.6-1.el7 | Fixed | RHSA-2018:3757 |
| CloudForms Management Engine 5 | postgresql96 | Not affected | n/a |
| Red Hat Ansible Tower 3 | postgresql96-libs | Not affected | n/a |
| Red Hat Enterprise Linux 5 | postgresql | Not affected | n/a |
| Red Hat Enterprise Linux 6 | postgresql | Not affected | n/a |
| Red Hat Enterprise Linux 7 | postgresql | Not affected | n/a |
| Red Hat Enterprise Linux 8 | libpq | Not affected | n/a |
| Red Hat Enterprise Linux 8 | postgresql | Not affected | n/a |
| Red Hat Satellite 5 | rh-postgresql95-postgresql | Not affected | n/a |
| Red Hat Software Collections | rh-postgresql95-postgresql | Not affected | n/a |
| Red Hat Software Collections | rh-postgresql96-postgresql | Not affected | n/a |
| Red Hat Virtualization 4 | postgresql | Not affected | n/a |
| Red Hat Virtualization 4 | rh-postgresql95-postgresql | Not affected | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
This issue did not affect the versions of postgresql as shipped with Red Hat Enterprise Linux 5, 6, and 7 as they did not include support for triggers with `referecing` syntax, which was included in a later version of the program. It also doesn't affect the versions of postgresql shipped with CloudForms 4.2, 4.5 and 4.6, and Satellite 5, for the same reason as above. This issue did not affect the versions of postgresql shipped within Tower, as there is no code path for Tower users to call the CREATE statement.
Metrics
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
AV:N/AC:L/Au:N/C:P/I:P/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2021–2026- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (37 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 5.15% (0.05150) | 92.16th | v5 (v2026.06.15) |
| Jun 15, 2026 | 5.15% (0.05150) | 91.31th | v5 (v2026.06.15) |
| Feb 1, 2026 | 0.50% (0.00499) | 65.49th | v4 (v2025.03.14) |
| Jan 4, 2026 | 1.54% (0.01537) | 80.91th | v4 (v2025.03.14) |
| Jan 1, 2026 | 0.45% (0.00452) | 63.34th | v4 (v2025.03.14) |
| Dec 4, 2025 | 1.54% (0.01537) | 80.78th | v4 (v2025.03.14) |
| Dec 1, 2025 | 0.45% (0.00452) | 63.05th | v4 (v2025.03.14) |
| Nov 21, 2025 | 1.54% (0.01537) | 80.77th | v4 (v2025.03.14) |
| Nov 18, 2025 | 3.33% (0.03325) | 86.05th | v4 (v2025.03.14) |
| Jun 6, 2025 | 1.31% (0.01312) | 78.81th | v4 (v2025.03.14) |
| Jun 4, 2025 | 2.80% (0.02805) | 85.43th | v4 (v2025.03.14) |
| Jun 1, 2025 | 0.85% (0.00849) | 73.84th | v4 (v2025.03.14) |
| May 4, 2025 | 2.80% (0.02805) | 85.34th | v4 (v2025.03.14) |
| May 1, 2025 | 0.85% (0.00849) | 73.74th | v4 (v2025.03.14) |
| Apr 12, 2025 | 2.80% (0.02805) | 84.94th | v4 (v2025.03.14) |
| Apr 11, 2025 | 0.85% (0.00849) | 72.89th | v4 (v2025.03.14) |
| Apr 10, 2025 | 2.80% (0.02805) | 84.94th | v4 (v2025.03.14) |
| Mar 31, 2025 | 1.66% (0.01659) | 80.37th | v4 (v2025.03.14) |
| Mar 30, 2025 | 0.42% (0.00418) | 58.86th | v4 (v2025.03.14) |
| Mar 22, 2025 | 1.66% (0.01659) | 80.45th | v4 (v2025.03.14) |
| Mar 21, 2025 | 0.42% (0.00418) | 59.15th | v4 (v2025.03.14) |
| Mar 19, 2025 | 1.66% (0.01659) | 80.03th | v4 (v2025.03.14) |
| Mar 18, 2025 | 0.42% (0.00418) | 59.70th | v4 (v2025.03.14) |
| Mar 17, 2025 | 1.66% (0.01659) | 80.80th | v4 (v2025.03.14) |
| Dec 12, 2024 | 0.40% (0.00400) | 74.44th | v3 (v2023.03.01) |
| Apr 5, 2024 | 0.57% (0.00568) | 77.44th | v3 (v2023.03.01) |
| Nov 7, 2023 | 0.71% (0.00710) | 78.34th | v3 (v2023.03.01) |
| Apr 11, 2023 | 0.73% (0.00725) | 77.80th | v3 (v2023.03.01) |
| Mar 7, 2023 | 0.77% (0.00770) | 78.45th | v3 (v2023.03.01) |
| Mar 6, 2023 | 1.11% (0.01108) | 55.18th | v2 (v2022.01.01) |
| Sep 17, 2022 | 1.11% (0.01108) | 53.57th | v2 (v2022.01.01) |
| Apr 1, 2022 | 1.11% (0.01108) | 51.54th | v2 (v2022.01.01) |
| Feb 4, 2022 | 1.11% (0.01108) | 29.61th | v2 (v2022.01.01) |
| Feb 3, 2022 | 1.66% (0.01659) | 34.20th | v1 |
| Jan 6, 2022 | 1.66% (0.01659) | 33.50th | v1 |
| Sep 1, 2021 | 1.66% (0.01659) | 73.96th | v1 |
| Apr 14, 2021 | 1.66% (0.01659) | 0.00th | v1 |
References (11)
- http://www.securityfocus.com/bid/105923 vdb-entryx_refsource_BIDThird Party AdvisoryVDB Entry
- http://www.securitytracker.com/id/1042144 vdb-entryx_refsource_SECTRACKThird Party AdvisoryVDB Entry
- https://access.redhat.com/errata/RHSA-2018:3757 vendor-advisoryx_refsource_REDHATThird Party Advisory
- https://access.redhat.com/security/cve/CVE-2018-16850 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1645937 Issue Tracking
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16850 x_refsource_CONFIRMIssue TrackingPatchThird Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2018-16850
- https://security.gentoo.org/glsa/201811-24 vendor-advisoryx_refsource_GENTOOMitigationThird Party Advisory
- https://usn.ubuntu.com/3818-1/ vendor-advisoryx_refsource_UBUNTUThird Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2018-16850
- https://www.postgresql.org/about/news/1905/ x_refsource_CONFIRMRelease NotesVendor Advisory
| Link | Providers | Tags |
|---|---|---|
| http://www.securityfocus.com/bid/105923 | vdb-entryx_refsource_BIDThird Party AdvisoryVDB Entry | |
| http://www.securitytracker.com/id/1042144 | vdb-entryx_refsource_SECTRACKThird Party AdvisoryVDB Entry | |
| https://access.redhat.com/errata/RHSA-2018:3757 | vendor-advisoryx_refsource_REDHATThird Party Advisory | |
| https://access.redhat.com/security/cve/CVE-2018-16850 | Vendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=1645937 | Issue Tracking | |
| https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16850 | x_refsource_CONFIRMIssue TrackingPatchThird Party Advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2018-16850 | ||
| https://security.gentoo.org/glsa/201811-24 | vendor-advisoryx_refsource_GENTOOMitigationThird Party Advisory | |
| https://usn.ubuntu.com/3818-1/ | vendor-advisoryx_refsource_UBUNTUThird Party Advisory | |
| https://www.cve.org/CVERecord?id=CVE-2018-16850 | ||
| https://www.postgresql.org/about/news/1905/ | x_refsource_CONFIRMRelease NotesVendor Advisory |
Change history (0)
No recorded changes yet.