ID CVE-2018-1058
Summary 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.
References
Vulnerable Configurations
  • PostgreSQL PostgreSQL 9.3
    cpe:2.3:a:postgresql:postgresql:9.3
  • PostgreSQL 9.3.0
    cpe:2.3:a:postgresql:postgresql:9.3.0
  • PostgreSQL PostgreSQL 9.3.1
    cpe:2.3:a:postgresql:postgresql:9.3.1
  • PostgreSQL PostgreSQL 9.3.2
    cpe:2.3:a:postgresql:postgresql:9.3.2
  • PostgreSQL PostgreSQL 9.3.3
    cpe:2.3:a:postgresql:postgresql:9.3.3
  • PostgreSQL 9.3.4
    cpe:2.3:a:postgresql:postgresql:9.3.4
  • PostgreSQL 9.3.5
    cpe:2.3:a:postgresql:postgresql:9.3.5
  • PostgreSQL 9.3.6
    cpe:2.3:a:postgresql:postgresql:9.3.6
  • PostgreSQL 9.3.7
    cpe:2.3:a:postgresql:postgresql:9.3.7
  • PostgreSQL 9.3.8
    cpe:2.3:a:postgresql:postgresql:9.3.8
  • PostgreSQL 9.3.9
    cpe:2.3:a:postgresql:postgresql:9.3.9
  • PostgreSQL 9.3.10
    cpe:2.3:a:postgresql:postgresql:9.3.10
  • PostgreSQL 9.3.11
    cpe:2.3:a:postgresql:postgresql:9.3.11
  • PostgreSQL 9.3.12
    cpe:2.3:a:postgresql:postgresql:9.3.12
  • PostgreSQL 9.3.13
    cpe:2.3:a:postgresql:postgresql:9.3.13
  • PostgreSQL 9.3.14
    cpe:2.3:a:postgresql:postgresql:9.3.14
  • PostgreSQL 9.3.15
    cpe:2.3:a:postgresql:postgresql:9.3.15
  • PostgreSQL 9.3.16
    cpe:2.3:a:postgresql:postgresql:9.3.16
  • PostgreSQL 9.3.17
    cpe:2.3:a:postgresql:postgresql:9.3.17
  • PostgreSQL 9.3.18
    cpe:2.3:a:postgresql:postgresql:9.3.18
  • PostgreSQL 9.3.19
    cpe:2.3:a:postgresql:postgresql:9.3.19
  • PostgreSQL 9.3.20
    cpe:2.3:a:postgresql:postgresql:9.3.20
  • PostgreSQL 9.3.21
    cpe:2.3:a:postgresql:postgresql:9.3.21
  • PostgreSQL 9.3.22
    cpe:2.3:a:postgresql:postgresql:9.3.22
  • PostgreSQL 9.3.23
    cpe:2.3:a:postgresql:postgresql:9.3.23
  • PostgreSQL 9.3.24
    cpe:2.3:a:postgresql:postgresql:9.3.24
  • PostgreSQL 9.3.25
    cpe:2.3:a:postgresql:postgresql:9.3.25
  • PostgreSQL PostgreSQL 9.4
    cpe:2.3:a:postgresql:postgresql:9.4
  • PostgreSQL 9.4.0
    cpe:2.3:a:postgresql:postgresql:9.4.0
  • PostgreSQL 9.4.1
    cpe:2.3:a:postgresql:postgresql:9.4.1
  • PostgreSQL 9.4.2
    cpe:2.3:a:postgresql:postgresql:9.4.2
  • PostgreSQL 9.4.3
    cpe:2.3:a:postgresql:postgresql:9.4.3
  • PostgreSQL 9.4.4
    cpe:2.3:a:postgresql:postgresql:9.4.4
  • PostgreSQL PostgreSQL 9.4.5
    cpe:2.3:a:postgresql:postgresql:9.4.5
  • PostgreSQL 9.4.6
    cpe:2.3:a:postgresql:postgresql:9.4.6
  • PostgreSQL 9.4.7
    cpe:2.3:a:postgresql:postgresql:9.4.7
  • PostgreSQL 9.4.8
    cpe:2.3:a:postgresql:postgresql:9.4.8
  • PostgreSQL 9.4.9
    cpe:2.3:a:postgresql:postgresql:9.4.9
  • PostgreSQL 9.4.10
    cpe:2.3:a:postgresql:postgresql:9.4.10
  • PostgreSQL 9.4.11
    cpe:2.3:a:postgresql:postgresql:9.4.11
  • PostgreSQL 9.4.12
    cpe:2.3:a:postgresql:postgresql:9.4.12
  • PostgreSQL 9.4.13
    cpe:2.3:a:postgresql:postgresql:9.4.13
  • PostgreSQL 9.4.14
    cpe:2.3:a:postgresql:postgresql:9.4.14
  • PostgreSQL 9.4.15
    cpe:2.3:a:postgresql:postgresql:9.4.15
  • PostgreSQL 9.4.16
    cpe:2.3:a:postgresql:postgresql:9.4.16
  • PostgreSQL 9.4.17
    cpe:2.3:a:postgresql:postgresql:9.4.17
  • PostgreSQL 9.4.18
    cpe:2.3:a:postgresql:postgresql:9.4.18
  • PostgreSQL 9.4.19
    cpe:2.3:a:postgresql:postgresql:9.4.19
  • PostgreSQL 9.4.20
    cpe:2.3:a:postgresql:postgresql:9.4.20
  • PostgreSQL 9.4.21
    cpe:2.3:a:postgresql:postgresql:9.4.21
  • PostgreSQL PostgreSQL 9.5
    cpe:2.3:a:postgresql:postgresql:9.5
  • PostgreSQL 9.5.0
    cpe:2.3:a:postgresql:postgresql:9.5.0
  • PostgreSQL 9.5.1
    cpe:2.3:a:postgresql:postgresql:9.5.1
  • PostgreSQL 9.5.2
    cpe:2.3:a:postgresql:postgresql:9.5.2
  • PostgreSQL 9.5.3
    cpe:2.3:a:postgresql:postgresql:9.5.3
  • PostgreSQL 9.5.4
    cpe:2.3:a:postgresql:postgresql:9.5.4
  • PostgreSQL 9.5.5
    cpe:2.3:a:postgresql:postgresql:9.5.5
  • PostgreSQL 9.5.6
    cpe:2.3:a:postgresql:postgresql:9.5.6
  • PostgreSQL 9.5.7
    cpe:2.3:a:postgresql:postgresql:9.5.7
  • PostgreSQL 9.5.8
    cpe:2.3:a:postgresql:postgresql:9.5.8
  • PostgreSQL 9.5.9
    cpe:2.3:a:postgresql:postgresql:9.5.9
  • PostgreSQL 9.5.10
    cpe:2.3:a:postgresql:postgresql:9.5.10
  • PostgreSQL 9.5.11
    cpe:2.3:a:postgresql:postgresql:9.5.11
  • PostgreSQL 9.5.12
    cpe:2.3:a:postgresql:postgresql:9.5.12
  • PostgreSQL 9.5.13
    cpe:2.3:a:postgresql:postgresql:9.5.13
  • PostgreSQL 9.5.14
    cpe:2.3:a:postgresql:postgresql:9.5.14
  • PostgreSQL 9.5.15
    cpe:2.3:a:postgresql:postgresql:9.5.15
  • PostgreSQL 9.5.16
    cpe:2.3:a:postgresql:postgresql:9.5.16
  • PostgreSQL 9.6
    cpe:2.3:a:postgresql:postgresql:9.6
  • PostgreSQL 9.6.0
    cpe:2.3:a:postgresql:postgresql:9.6.0
  • PostgreSQL 9.6.1
    cpe:2.3:a:postgresql:postgresql:9.6.1
  • PostgreSQL 9.6.2
    cpe:2.3:a:postgresql:postgresql:9.6.2
  • PostgreSQL 9.6.3
    cpe:2.3:a:postgresql:postgresql:9.6.3
  • PostgreSQL 9.6.4
    cpe:2.3:a:postgresql:postgresql:9.6.4
  • PostgreSQL 9.6.5
    cpe:2.3:a:postgresql:postgresql:9.6.5
  • PostgreSQL 9.6.6
    cpe:2.3:a:postgresql:postgresql:9.6.6
  • PostgreSQL 9.6.7
    cpe:2.3:a:postgresql:postgresql:9.6.7
  • PostgreSQL 9.6.8
    cpe:2.3:a:postgresql:postgresql:9.6.8
  • PostgreSQL 9.6.9
    cpe:2.3:a:postgresql:postgresql:9.6.9
  • PostgreSQL 9.6.10
    cpe:2.3:a:postgresql:postgresql:9.6.10
  • PostgreSQL 9.6.11
    cpe:2.3:a:postgresql:postgresql:9.6.11
  • PostgreSQL 9.6.12
    cpe:2.3:a:postgresql:postgresql:9.6.12
  • PostgreSQL 10.0
    cpe:2.3:a:postgresql:postgresql:10.0
  • Canonical Ubuntu Linux 14.04 LTS (Long-Term Support)
    cpe:2.3:o:canonical:ubuntu_linux:14.04:-:-:-:lts
  • Canonical Ubuntu Linux 16.04 LTS (Long-Term Support)
    cpe:2.3:o:canonical:ubuntu_linux:16.04:-:-:-:lts
  • Canonical Ubuntu Linux 17.10
    cpe:2.3:o:canonical:ubuntu_linux:17.10
  • Red Hat CloudForms 4.6
    cpe:2.3:a:redhat:cloudforms:4.6
CVSS
Base: 6.5
Impact:
Exploitability:
CWE CWE-264
CAPEC
  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Blue Boxing
    This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
  • Restful Privilege Elevation
    Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
  • Target Programs with Elevated Privileges
    This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.
  • Manipulating Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
nessus via4
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2018-340.NASL
    description This update for postgresql94 fixes the following issues : Security issues fixed : - CVE-2018-1058: Fixed uncontrolled search path element in pg_dump and other client applications (bsc#1081925). Bug fixes : - See release notes for details : - https://www.postgresql.org/docs/9.4/static/release-9-4-17.html - https://www.postgresql.org/docs/9.4/static/release-9-4-16.html This update was imported from the SUSE:SLE-12:Update update project.
    last seen 2019-02-21
    modified 2018-12-18
    plugin id 108932
    published 2018-04-10
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=108932
    title openSUSE Security Update : postgresql94 (openSUSE-2018-340)
  • NASL family PhotonOS Local Security Checks
    NASL id PHOTONOS_PHSA-2018-1_0-0122_POSTGRESQL.NASL
    description An update of the postgresql package has been released.
    last seen 2019-02-08
    modified 2019-02-07
    plugin id 121817
    published 2019-02-07
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=121817
    title Photon OS 1.0: Postgresql PHSA-2018-1.0-0122
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SU-2018-0876-1.NASL
    description This update for postgresql94 fixes the following issues: Security issues fixed : - CVE-2018-1058: Fixed uncontrolled search path element in pg_dump and other client applications (bsc#1081925). Bug fixes : - See release notes for details : - https://www.postgresql.org/docs/9.4/static/release-9-4-17.html - https://www.postgresql.org/docs/9.4/static/release-9-4-16.html Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-12-18
    plugin id 108873
    published 2018-04-06
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=108873
    title SUSE SLED12 / SLES12 Security Update : postgresql94 (SUSE-SU-2018:0876-1)
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2018-287.NASL
    description This update for postgresql96 fixes the following issues : Security issues fixed : - CVE-2018-1058: Fixed uncontrolled search path element in pg_dump and other client applications (bsc#1081925). Bug fixes : - See release notes for details : - https://www.postgresql.org/docs/9.6/static/release-9-6-8.html This update was imported from the SUSE:SLE-12:Update update project.
    last seen 2019-02-21
    modified 2018-12-18
    plugin id 108527
    published 2018-03-22
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=108527
    title openSUSE Security Update : postgresql96 (openSUSE-2018-287)
  • NASL family Ubuntu Local Security Checks
    NASL id UBUNTU_USN-3589-1.NASL
    description It was discovered that PostgreSQL incorrectly handled certain settings. An attacker could possibly use this issue to execute arbitrary code. Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-12-01
    plugin id 107192
    published 2018-03-07
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=107192
    title Ubuntu 14.04 LTS / 16.04 LTS / 17.10 : postgresql-9.3, postgresql-9.5, postgresql-9.6 vulnerability (USN-3589-1)
  • NASL family PhotonOS Local Security Checks
    NASL id PHOTONOS_PHSA-2018-2_0-0031_POSTGRESQL.NASL
    description An update of the postgresql package has been released.
    last seen 2019-02-08
    modified 2019-02-07
    plugin id 121931
    published 2019-02-07
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=121931
    title Photon OS 2.0: Postgresql PHSA-2018-2.0-0031
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2018-279.NASL
    description This update for postgresql95 fixes the following issues : Security issue fixed in PostgreSQL 9.5.12 : - CVE-2018-1058: Uncontrolled search path element in pg_dump and other client applications (boo#1081925).
    last seen 2019-02-21
    modified 2018-05-31
    plugin id 108443
    published 2018-03-19
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=108443
    title openSUSE Security Update : postgresql95 (openSUSE-2018-279)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SU-2018-0755-1.NASL
    description This update for postgresql94 fixes the following issues: Security issues fixed : - CVE-2018-1058: Fixed uncontrolled search path element in pg_dump and other client applications (bsc#1081925). Bug fixes : - See release notes for details : - https://www.postgresql.org/docs/9.4/static/release-9-4-17.html - https://www.postgresql.org/docs/9.4/static/release-9-4-16.html Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-12-18
    plugin id 108530
    published 2018-03-22
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=108530
    title SUSE SLES11 Security Update : postgresql94 (SUSE-SU-2018:0755-1)
  • NASL family PhotonOS Local Security Checks
    NASL id PHOTONOS_PHSA-2018-1_0-0122.NASL
    description An update of 'postgresql' packages of Photon OS has been released.
    last seen 2019-02-08
    modified 2019-02-07
    plugin id 111926
    published 2018-08-17
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=111926
    title Photon OS 1.0: Postgresql PHSA-2018-1.0-0122 (deprecated)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SU-2018-0756-1.NASL
    description This update for postgresql96 fixes the following issues: Security issues fixed : - CVE-2018-1058: Fixed uncontrolled search path element in pg_dump and other client applications (bsc#1081925). Bug fixes : - See release notes for details : - https://www.postgresql.org/docs/9.6/static/release-9-6-8.html Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-12-18
    plugin id 108531
    published 2018-03-22
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=108531
    title SUSE SLED12 / SLES12 Security Update : postgresql96 (SUSE-SU-2018:0756-1)
  • NASL family PhotonOS Local Security Checks
    NASL id PHOTONOS_PHSA-2018-2_0-0031.NASL
    description An update of {'postgresql'} packages of Photon OS has been released.
    last seen 2019-02-08
    modified 2019-02-07
    plugin id 111294
    published 2018-07-24
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=111294
    title Photon OS 2.0 : postgresql (PhotonOS-PHSA-2018-2.0-0031) (deprecated)
  • NASL family Amazon Linux Local Security Checks
    NASL id ALA_ALAS-2018-990.NASL
    description Uncontrolled search path element in pg_dump and other client applications 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. (CVE-2018-1058)
    last seen 2019-02-21
    modified 2018-05-31
    plugin id 108851
    published 2018-04-06
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=108851
    title Amazon Linux AMI : postgresql93 / postgresql94,postgresql95,postgresql96 (ALAS-2018-990)
  • NASL family Databases
    NASL id POSTGRESQL_20180301.NASL
    description The version of PostgreSQL installed on the remote host is 9.3.x prior to 9.3.22, 9.4.x prior to 9.4.17, 9.5.x prior to 9.5.12, 9.6.x prior to 9.6.8, or 10.x prior to 10.3. It is, therefore, affected by a privilege escalation vulnerability.
    last seen 2019-02-21
    modified 2018-12-14
    plugin id 107226
    published 2018-03-08
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=107226
    title PostgreSQL 9.3.x < 9.3.22 / 9.4.x < 9.4.17 / 9.5.x < 9.5.12 / 9.6.x < 9.6.8 / 10.x < 10.3 Privilege Escalation Vulnerability
  • NASL family FreeBSD Local Security Checks
    NASL id FREEBSD_PKG_E3EEDA2E1D6711E8A2EC6CC21735F730.NASL
    description The PostgreSQL project reports : - CVE-2018-1058: Uncontrolled search path element in pg_dump and other client applications
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 107112
    published 2018-03-02
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=107112
    title FreeBSD : PostgreSQL vulnerabilities (e3eeda2e-1d67-11e8-a2ec-6cc21735f730)
redhat via4
advisories
  • rhsa
    id RHSA-2018:2511
  • rhsa
    id RHSA-2018:2566
  • rhsa
    id RHSA-2018:3816
refmap via4
bid 103221
confirm
ubuntu USN-3589-1
Last major update 02-03-2018 - 10:29
Published 02-03-2018 - 10:29
Last modified 25-03-2019 - 15:20
Back to Top