PostgreSQL Empty Password Handling Remote Authentication Bypass - Nessus

Critical   Plugin ID: 104031

This page contains detailed information about the PostgreSQL Empty Password Handling Remote Authentication Bypass Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 104031
Name: PostgreSQL Empty Password Handling Remote Authentication Bypass
Filename: postgres_auth_empty_password.nbin
Vulnerability Published: 2017-08-10
This Plugin Published: 2017-10-20
Last Modification Time: 2022-04-11
Plugin Version: 1.58
Plugin Type: remote
Plugin Family: Databases
Dependencies: postgresql_detect.nasl
Excluded KB Items [?]: global_settings/supplied_logins_only

Vulnerability Information


Severity: Critical
Vulnerability Published: 2017-08-10
Patch Published: 2017-08-10
CVE [?]: CVE-2017-7546
CPE [?]: cpe:/a:postgresql:postgresql

Synopsis

Postgresql has a flaw that allows the attacker to login with empty password.

Description

PostgreSQL contains a flaw that is triggered when attempting to authenticate to the database with an empty password using a modified or a non-libpq-based client. This allows a remote attacker to bypass authentication mechanisms.

Solution

Upgrade to PostgreSQL 9.6.4, 9.5.8, 9.4.13, 9.3.18, 9.2.22 or later.

Public Exploits


Target Network Port(s): 5432
Target Asset(s): Services/postgresql
Exploit Available: True (GitHub)
Exploit Ease: Exploits (PoCs) are available

Here's the list of publicly known exploits and PoCs for verifying the PostgreSQL Empty Password Handling Remote Authentication Bypass vulnerability:

  1. GitHub: https://github.com/snic-nsc/cvechecker
    [CVE-2017-7546]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:U/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:5.5 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:5.5 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:8.5 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.5 (High)

Go back to menu.

Plugin Source


The postgres_auth_empty_password.nbin Nessus plugin is distributed in a propriatory binary format and its source code is protected. This script is Copyright (C) 2017-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/postgres_auth_empty_password.nbin
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\postgres_auth_empty_password.nbin
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/postgres_auth_empty_password.nbin

Go back to menu.

How to Run


Here is how to run the PostgreSQL Empty Password Handling Remote Authentication Bypass as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Databases plugin family.
  6. On the right side table select PostgreSQL Empty Password Handling Remote Authentication Bypass plugin ID 104031.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl postgres_auth_empty_password.nbin -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a postgres_auth_empty_password.nbin -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - postgres_auth_empty_password.nbin -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state postgres_auth_empty_password.nbin -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 102872 - Amazon Linux AMI : postgresql93 / postgresql92 (ALAS-2017-884)
  • 102873 - Amazon Linux AMI : postgresql94 / postgresql95 (ALAS-2017-885)
  • 103755 - Amazon Linux AMI : postgresql96 (ALAS-2017-908)
  • 103230 - CentOS 7 : postgresql (CESA-2017:2728)
  • 103706 - CentOS 6 : postgresql (CESA-2017:2860)
  • 102368 - Debian DLA-1051-1 : postgresql-9.1 security update
  • 102442 - Debian DSA-3935-1 : postgresql-9.4 - security update
  • 102443 - Debian DSA-3936-1 : postgresql-9.6 - security update
  • 103733 - EulerOS 2.0 SP1 : postgresql (EulerOS-SA-2017-1231)
  • 103734 - EulerOS 2.0 SP2 : postgresql (EulerOS-SA-2017-1232)
  • 102828 - Fedora 25 : postgresql (2017-9148fe36b9)
  • 102490 - Fedora 26 : postgresql (2017-d9cac37bd8)
  • 102614 - Fedora 26 : mingw-postgresql (2017-f9e66916ec)
  • 102408 - FreeBSD : PostgreSQL vulnerabilities (982872f1-7dd3-11e7-9736-6cc21735f730)
  • 103724 - GLSA-201710-06 : PostgreSQL: Multiple vulnerabilities
  • 127366 - NewStart CGSL MAIN 4.05 : postgresql Vulnerability (NS-SA-2019-0121)
  • 103156 - openSUSE Security Update : postgresql94 (openSUSE-2017-1020)
  • 103157 - openSUSE Security Update : postgresql96 (openSUSE-2017-1021)
  • 102847 - openSUSE Security Update : postgresql93 (openSUSE-2017-985)
  • 106965 - openSUSE Security Update : postgresql95 (openSUSE-2018-204)
  • 103238 - Oracle Linux 7 : postgresql (ELSA-2017-2728)
  • 103684 - Oracle Linux 6 : postgresql (ELSA-2017-2860)
  • 102527 - PostgreSQL 9.2.x < 9.2.22 / 9.3.x < 9.3.18 / 9.4.x < 9.4.13 / 9.5.x < 9.5.8 / 9.6.x < 9.6.4 Multiple Vulnerabilities
  • 103209 - RHEL 7 : postgresql (RHSA-2017:2728)
  • 103686 - RHEL 6 : postgresql (RHSA-2017:2860)
  • 103244 - Scientific Linux Security Update : postgresql on SL7.x x86_64 (20170914)
  • 103688 - Scientific Linux Security Update : postgresql on SL6.x i386/x86_64 (20171005)
  • 102695 - SUSE SLES12 Security Update : postgresql93 (SUSE-SU-2017:2236-1)
  • 102800 - SUSE SLES11 Security Update : postgresql94 (SUSE-SU-2017:2258-1)
  • 102973 - SUSE SLED12 / SLES12 Security Update : postgresql94 (SUSE-SU-2017:2355-1)
  • 102974 - SUSE SLED12 / SLES12 Security Update : postgresql96 (SUSE-SU-2017:2356-1)
  • 102522 - Ubuntu 14.04 LTS / 16.04 LTS / 17.04 : postgresql-9.3, postgresql-9.5, postgresql-9.6 vulnerabilities (USN-3390-1)
  • 119231 - Virtuozzo 6 : postgresql / postgresql-contrib / postgresql-devel / etc (VZLSA-2017-2860)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file postgres_auth_empty_password.nbin version 1.58. For more plugins, visit the Nessus Plugin Library.

Go back to menu.