SQL injection in postgresql
Priority MEDIUM 50CWE-89Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-89.
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.
Why it matters now
EPSS 0.0515 92nd percentileScored 2026-11-07
Fix Fixed Red Hat: 1 advisory
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| PostgreSQL | postgresql | 11.1; 10.6 | — | No fix listed | CNA |
- postgresql VendorPostgreSQL Affected 11.1; 10.6 Fixed in — No fix listed CNA
CPE configurations NVD · 7
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* | 10.0 to before 10.6; 11.0 to before 11.1 | Vulnerable | PostgreSQL |
| cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:* | 7.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux:7.4:*:*:*:*:*:*:* | 7.4 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux:7.5:*:*:*:*:*:*:* | 7.5 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux:7.6:*:*:*:*:*:*:* | 7.6 | Vulnerable | Red Hat |
| cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:* | 18.04 | Vulnerable | Canonical |
| cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:* | 18.10 | Vulnerable | Canonical |
- cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* Versions 10.0 to before 10.6; 11.0 to before 11.1 Vulnerable ·PostgreSQL
- cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:* Versions 7.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux:7.4:*:*:*:*:*:*:* Versions 7.4 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux:7.5:*:*:*:*:*:*:* Versions 7.5 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux:7.6:*:*:*:*:*:*:* Versions 7.6 Vulnerable ·Red Hat
- cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:* Versions 18.04 Vulnerable ·Canonical
- cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:* Versions 18.10 Vulnerable ·Canonical
Remediation
Red Hat 1 advisory
- RHSA-2018:3757 Released 2018-12-03 · Red Hat rating Importantrh-postgresql10-postgresql security update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-postgresql10-postgresql-10.6-1.el7, rh-postgresql10-postgresql-contrib-10.6-1.el7, rh-postgresql10-postgresql-contrib-syspaths-10.6-1.el7 +11
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) rh-postgresql10-postgresql-10.6-1.el7, rh-postgresql10-postgresql-contrib-10.6-1.el7, rh-postgresql10-postgresql-contrib-syspaths-10.6-1.el7 +11
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) rh-postgresql10-postgresql-10.6-1.el7, rh-postgresql10-postgresql-contrib-10.6-1.el7, rh-postgresql10-postgresql-contrib-syspaths-10.6-1.el7 +11
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-postgresql10-postgresql-10.6-1.el7, rh-postgresql10-postgresql-contrib-10.6-1.el7, rh-postgresql10-postgresql-contrib-syspaths-10.6-1.el7 +11
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-postgresql10-postgresql-10.6-1.el7, rh-postgresql10-postgresql-contrib-10.6-1.el7, rh-postgresql10-postgresql-contrib-syspaths-10.6-1.el7 +11
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2018:3757 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) | Fixed | RHSA-2018:3757 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) | Fixed | RHSA-2018:3757 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) | Fixed | RHSA-2018:3757 |
| Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2018:3757 |
Not affected: 9 products
- CloudForms Management Engine 5
- Red Hat Ansible Tower 3
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Satellite 5
- Red Hat Software Collections
- Red Hat Virtualization 4
Timeline
- 2026-10-02 Threatist record created from CVE-2018-16850
- 2026-10-03 Alias added: GHSA-h6p9-49w4-8mm8
References
More Postgresql vulnerabilities
- TI-2019-06651 In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and… CVSS 3.0HIGH 7.2
- TI-2017-05187 Improper authentication in postgresql CVSS 3.0CRITICAL 9.8
- TI-2020-15711 SQL injection in postgresql CVSS 3.1HIGH 8.8
- TI-2013-01675 Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9… CVSS 2.0MEDIUM 6.5
- TI-2007-03176 The Database Link library (dblink) in PostgreSQL 8.1 implements functions via CREATE… CVSS 2.0HIGH 9.0
- TI-2022-01423 SQL injection in postgresql CVSS 3.1HIGH 8.8
Sources
- CVE-2018-16850 · CVE Program
- CVE-2018-16850 · NVD
- FIRST EPSS
- GHSA-h6p9-49w4-8mm8 · GitHub Advisory Database · CC BY 4.0
- CVE-2018-16850 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences