CVE-2018-1058: PostgreSQL - Privilege Escalation
- Cve: CVE-2018-1058
- Name: PostgreSQL - Privilege Escalation
- Description: A flaw was found in the way Postgresql allowed a user to modify the behavior of a query for other users. An attacker with a user account could use this flaw to execute code with the permissions of superuser in the database. Versions 9.3 through 10 are affected.
- Impact: Attackers can execute arbitrary code with superuser privileges, potentially leading to full database compromise.
- Remediation: Update to the latest version of PostgreSQL, preferably the latest stable release.
- Vulnerability type: broken_access_control
- Vulnerability impact: privilege_escalation
- Requirement type: logged_in
- Requirements: Attacker needs a user account
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.13098
- Epss percentile: 0.9645
- Assignee: [email protected]
- Published at: 2018-03-02T15:29:00Z
- Age in days: 3189
- Modified at: 2026-06-17T01:50:23Z
- Patch available: yes
- Public exploits total: 2
- References total: 7
- Products total: 3
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2018-1058
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, oss, projects total, projects, rejected by nvd
Cwe
| Id | Name |
|---|---|
| CWE-20 | Improper Input Validation |
| NVD-CWE-noinfo | — |
Hackerone
- Reports: 3
- Rank: 3235
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/mthamil107/DB_Audit_Research | poc-in-github | 2026-08-19 |
| https://github.com/ccchme/CVE-2018-1058 | poc-in-github | 2026-05-09 |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://www.postgresql.org/about/news/1834/ | Vendor Advisory |
| http://www.securityfocus.com/bid/103221 | Third Party Advisory, VDB Entry |
| https://access.redhat.com/errata/RHSA-2018:2511 | Third Party Advisory |
| https://access.redhat.com/errata/RHSA-2018:2566 | Third Party Advisory |
| https://access.redhat.com/errata/RHSA-2018:3816 | Third Party Advisory |
| https://bugzilla.redhat.com/show_bug.cgi?id=1547044 | Issue Tracking, Third Party Advisory |
| https://usn.ubuntu.com/3589-1/ | Third Party Advisory |
Products
Same in every row:
- Platform bound: no
- Sources: nvd
| Product | Affected | Url |
|---|---|---|
| postgresql:postgresql | >= 10.0, < 10.3; >= 9.6, < 9.6.8; >= 9.5, < 9.5.12; >= 9.4, < 9.4.17; >= 9.3, < 9.3.22 | /v1/products/postgresql/postgresql |
| canonical:ubuntu_linux | = 17.10, = 16.04, = 14.04 | /v1/products/canonical/ubuntu_linux |
| redhat:cloudforms | = 4.6 | /v1/products/redhat/cloudforms |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Public exploit: yes
- Public exploit count: 2
- Public exploit first date: 2026-05-09
- Remote: yes
- Authentication required: yes
- Hackerone reports: 3
- Exposed hosts: 21109361
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since