Cloudanix VulnDB

CVE-2015-5288

None

CVSS

—

EPSS

4.5%

Published

Oct 26, 2015

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in an older PostgreSQL encryption helper can let remote attackers crash the database or peek at its internal memory without logging in.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Exposure
Component
Application
Class
Information Disclosure
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The crypt function in pgcrypto accepts an insufficiently long salt value, triggering a crash or allowing out-of-bounds memory reads that expose server process memory contents over the network.

Why it matters to the business

Unpatched PostgreSQL servers can be crashed remotely or have sensitive memory contents disclosed, leading to service outages and potential exposure of credentials or other in-memory data without authentication.

How an attack unfolds

An attacker connects to a PostgreSQL instance exposing pgcrypto and supplies a crypt call with a deliberately short salt; the server either terminates or returns portions of its memory, which the attacker can repeat to gather useful data.

How to fix it

Upgrade PostgreSQL to 9.0.23, 9.1.19, 9.2.14, 9.3.10 or 9.4.5 (or later) and restart affected instances; if immediate upgrade is impossible, disable or remove the pgcrypto contrib module.

How to confirm the fix worked

Confirm the running PostgreSQL version is at or above the fixed releases listed above; test that crypt() calls with short salts no longer crash the server or return memory contents.

Typical attack path

  1. Identify an exposed PostgreSQL service accepting connections
  2. Issue a crafted crypt() call via pgcrypto with a too-short salt
  3. Observe server crash (DoS) or receive leaked memory bytes
  4. Repeat or analyze returned memory for sensitive information

How to detect it

Review PostgreSQL server logs for sudden crashes or errors originating from the pgcrypto module; correlate with network connections that include crypt() function calls containing unusually short salt values.

What your security team should do

  • Apply the listed version upgrades immediately on all PostgreSQL deployments
  • Scan for any remaining instances still running pre-fix versions
  • Review application code for direct use of pgcrypto crypt() and add input validation on salt length as a defense-in-depth measure

The record

The crypt function in contrib/pgcrypto in PostgreSQL before 9.0.23, 9.1.x before 9.1.19, 9.2.x before 9.2.14, 9.3.x before 9.3.10, and 9.4.x before 9.4.5 allows attackers to cause a denial of service (server crash) or read arbitrary server memory via a "too-short" salt.

Affected packages

Ecosystem Package Introduced Fixed
Debian:6.0 postgresql-8.4 0 8.4.22lts5-0+deb6u1
Debian:7 postgresql-9.1 0 9.1.20-0+deb7u1
Debian:8 postgresql-9.4 0 9.4.5-0+deb8u1
Mageia:5 postgresql9.3 0 9.3.10-1.mga5
Mageia:5 postgresql9.4 0 9.4.5-1.mga5
Red Hat:enterprise_linux:6::client postgresql 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::client postgresql-contrib 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::client postgresql-debuginfo 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::client postgresql-devel 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::client postgresql-docs 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::client postgresql-libs 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::client postgresql-plperl 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::client postgresql-plpython 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::client postgresql-pltcl 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::client postgresql-server 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::client postgresql-test 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::computenode postgresql 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::computenode postgresql-contrib 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::computenode postgresql-debuginfo 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::computenode postgresql-devel 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::computenode postgresql-docs 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::computenode postgresql-libs 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::computenode postgresql-plperl 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::computenode postgresql-plpython 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::computenode postgresql-pltcl 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::computenode postgresql-server 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::computenode postgresql-test 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::server postgresql 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::server postgresql-contrib 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::server postgresql-debuginfo 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::server postgresql-devel 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::server postgresql-docs 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::server postgresql-libs 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::server postgresql-plperl 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::server postgresql-plpython 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::server postgresql-pltcl 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::server postgresql-server 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::server postgresql-test 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::workstation postgresql 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::workstation postgresql-contrib 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::workstation postgresql-debuginfo 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::workstation postgresql-devel 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::workstation postgresql-docs 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::workstation postgresql-libs 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::workstation postgresql-plperl 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::workstation postgresql-plpython 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::workstation postgresql-pltcl 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::workstation postgresql-server 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:6::workstation postgresql-test 0 0:8.4.20-4.el6_7
Red Hat:enterprise_linux:7::client postgresql 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::client postgresql-contrib 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::client postgresql-debuginfo 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::client postgresql-devel 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::client postgresql-docs 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::client postgresql-libs 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::client postgresql-plperl 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::client postgresql-plpython 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::client postgresql-pltcl 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::client postgresql-server 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::client postgresql-test 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::client postgresql-upgrade 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::computenode postgresql 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::computenode postgresql-contrib 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::computenode postgresql-debuginfo 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::computenode postgresql-devel 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::computenode postgresql-docs 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::computenode postgresql-libs 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::computenode postgresql-plperl 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::computenode postgresql-plpython 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::computenode postgresql-pltcl 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::computenode postgresql-server 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::computenode postgresql-test 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::computenode postgresql-upgrade 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::server postgresql 0 0:9.2.14-1.ael7b_1
Red Hat:enterprise_linux:7::server postgresql-contrib 0 0:9.2.14-1.ael7b_1
Red Hat:enterprise_linux:7::server postgresql-debuginfo 0 0:9.2.14-1.ael7b_1
Red Hat:enterprise_linux:7::server postgresql-devel 0 0:9.2.14-1.ael7b_1
Red Hat:enterprise_linux:7::server postgresql-docs 0 0:9.2.14-1.ael7b_1
Red Hat:enterprise_linux:7::server postgresql-libs 0 0:9.2.14-1.ael7b_1
Red Hat:enterprise_linux:7::server postgresql-plperl 0 0:9.2.14-1.ael7b_1
Red Hat:enterprise_linux:7::server postgresql-plpython 0 0:9.2.14-1.ael7b_1
Red Hat:enterprise_linux:7::server postgresql-pltcl 0 0:9.2.14-1.ael7b_1
Red Hat:enterprise_linux:7::server postgresql-server 0 0:9.2.14-1.ael7b_1
Red Hat:enterprise_linux:7::server postgresql-test 0 0:9.2.14-1.ael7b_1
Red Hat:enterprise_linux:7::server postgresql-upgrade 0 0:9.2.14-1.ael7b_1
Red Hat:enterprise_linux:7::workstation postgresql 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::workstation postgresql-contrib 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::workstation postgresql-debuginfo 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::workstation postgresql-devel 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::workstation postgresql-docs 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::workstation postgresql-libs 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::workstation postgresql-plperl 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::workstation postgresql-plpython 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::workstation postgresql-pltcl 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::workstation postgresql-server 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::workstation postgresql-test 0 0:9.2.14-1.el7_1
Red Hat:enterprise_linux:7::workstation postgresql-upgrade 0 0:9.2.14-1.el7_1
Red Hat:rhel_software_collections:2::el6 postgresql92-postgresql 0 0:9.2.14-1.el6
Red Hat:rhel_software_collections:2::el6 postgresql92-postgresql-contrib 0 0:9.2.14-1.el6
Red Hat:rhel_software_collections:2::el6 postgresql92-postgresql-debuginfo 0 0:9.2.14-1.el6
Red Hat:rhel_software_collections:2::el6 postgresql92-postgresql-devel 0 0:9.2.14-1.el6
Red Hat:rhel_software_collections:2::el6 postgresql92-postgresql-docs 0 0:9.2.14-1.el6
Red Hat:rhel_software_collections:2::el6 postgresql92-postgresql-libs 0 0:9.2.14-1.el6
Red Hat:rhel_software_collections:2::el6 postgresql92-postgresql-plperl 0 0:9.2.14-1.el6
Red Hat:rhel_software_collections:2::el6 postgresql92-postgresql-plpython 0 0:9.2.14-1.el6
Red Hat:rhel_software_collections:2::el6 postgresql92-postgresql-pltcl 0 0:9.2.14-1.el6
Red Hat:rhel_software_collections:2::el6 postgresql92-postgresql-server 0 0:9.2.14-1.el6
Red Hat:rhel_software_collections:2::el6 postgresql92-postgresql-test 0 0:9.2.14-1.el6
Red Hat:rhel_software_collections:2::el6 postgresql92-postgresql-upgrade 0 0:9.2.14-1.el6
Red Hat:rhel_software_collections:2::el6 rh-postgresql94-postgresql 0 0:9.4.5-1.el6
Red Hat:rhel_software_collections:2::el6 rh-postgresql94-postgresql-contrib 0 0:9.4.5-1.el6
Red Hat:rhel_software_collections:2::el6 rh-postgresql94-postgresql-debuginfo 0 0:9.4.5-1.el6
Red Hat:rhel_software_collections:2::el6 rh-postgresql94-postgresql-devel 0 0:9.4.5-1.el6
Red Hat:rhel_software_collections:2::el6 rh-postgresql94-postgresql-docs 0 0:9.4.5-1.el6
Red Hat:rhel_software_collections:2::el6 rh-postgresql94-postgresql-libs 0 0:9.4.5-1.el6
Red Hat:rhel_software_collections:2::el6 rh-postgresql94-postgresql-plperl 0 0:9.4.5-1.el6
Red Hat:rhel_software_collections:2::el6 rh-postgresql94-postgresql-plpython 0 0:9.4.5-1.el6
Red Hat:rhel_software_collections:2::el6 rh-postgresql94-postgresql-pltcl 0 0:9.4.5-1.el6
Red Hat:rhel_software_collections:2::el6 rh-postgresql94-postgresql-server 0 0:9.4.5-1.el6
Red Hat:rhel_software_collections:2::el6 rh-postgresql94-postgresql-test 0 0:9.4.5-1.el6
Red Hat:rhel_software_collections:2::el6 rh-postgresql94-postgresql-upgrade 0 0:9.4.5-1.el6
Red Hat:rhel_software_collections:2::el7 postgresql92-postgresql 0 0:9.2.14-1.el7
Red Hat:rhel_software_collections:2::el7 postgresql92-postgresql-contrib 0 0:9.2.14-1.el7
Red Hat:rhel_software_collections:2::el7 postgresql92-postgresql-debuginfo 0 0:9.2.14-1.el7
Red Hat:rhel_software_collections:2::el7 postgresql92-postgresql-devel 0 0:9.2.14-1.el7
Red Hat:rhel_software_collections:2::el7 postgresql92-postgresql-docs 0 0:9.2.14-1.el7
Red Hat:rhel_software_collections:2::el7 postgresql92-postgresql-libs 0 0:9.2.14-1.el7
Red Hat:rhel_software_collections:2::el7 postgresql92-postgresql-plperl 0 0:9.2.14-1.el7
Red Hat:rhel_software_collections:2::el7 postgresql92-postgresql-plpython 0 0:9.2.14-1.el7
Red Hat:rhel_software_collections:2::el7 postgresql92-postgresql-pltcl 0 0:9.2.14-1.el7
Red Hat:rhel_software_collections:2::el7 postgresql92-postgresql-server 0 0:9.2.14-1.el7
Red Hat:rhel_software_collections:2::el7 postgresql92-postgresql-test 0 0:9.2.14-1.el7
Red Hat:rhel_software_collections:2::el7 postgresql92-postgresql-upgrade 0 0:9.2.14-1.el7
Red Hat:rhel_software_collections:2::el7 rh-postgresql94-postgresql 0 0:9.4.5-1.el7
Red Hat:rhel_software_collections:2::el7 rh-postgresql94-postgresql-contrib 0 0:9.4.5-1.el7
Red Hat:rhel_software_collections:2::el7 rh-postgresql94-postgresql-debuginfo 0 0:9.4.5-1.el7
Red Hat:rhel_software_collections:2::el7 rh-postgresql94-postgresql-devel 0 0:9.4.5-1.el7
Red Hat:rhel_software_collections:2::el7 rh-postgresql94-postgresql-docs 0 0:9.4.5-1.el7
Red Hat:rhel_software_collections:2::el7 rh-postgresql94-postgresql-libs 0 0:9.4.5-1.el7
Red Hat:rhel_software_collections:2::el7 rh-postgresql94-postgresql-plperl 0 0:9.4.5-1.el7
Red Hat:rhel_software_collections:2::el7 rh-postgresql94-postgresql-plpython 0 0:9.4.5-1.el7
Red Hat:rhel_software_collections:2::el7 rh-postgresql94-postgresql-pltcl 0 0:9.4.5-1.el7
Red Hat:rhel_software_collections:2::el7 rh-postgresql94-postgresql-server 0 0:9.4.5-1.el7
Red Hat:rhel_software_collections:2::el7 rh-postgresql94-postgresql-test 0 0:9.4.5-1.el7
Red Hat:rhel_software_collections:2::el7 rh-postgresql94-postgresql-upgrade 0 0:9.4.5-1.el7
SUSE:Linux Enterprise Desktop 11 SP3 postgresql91 0 9.1.19-0.5.1
SUSE:Linux Enterprise Desktop 11 SP3 postgresql94 0 9.4.5-0.8.3
SUSE:Linux Enterprise Desktop 11 SP3 postgresql94-libs 0 9.4.5-0.8.3
SUSE:Linux Enterprise Desktop 11 SP4 postgresql94 0 9.4.5-0.8.3
SUSE:Linux Enterprise Desktop 11 SP4 postgresql94 0 9.4.6-0.14.3
SUSE:Linux Enterprise Desktop 11 SP4 postgresql94-libs 0 9.4.5-0.8.3
SUSE:Linux Enterprise Desktop 11 SP4 postgresql94-libs 0 9.4.6-0.14.3
SUSE:Linux Enterprise Desktop 12 postgresql93 0 9.3.10-11.1
SUSE:Linux Enterprise Desktop 12 postgresql93-libs 0 9.3.10-11.1
SUSE:Linux Enterprise Desktop 12 postgresql94 0 9.4.5-4.5
SUSE:Linux Enterprise Desktop 12 postgresql94-libs 0 9.4.5-4.1
SUSE:Linux Enterprise Server 11 SP3 postgresql91 0 9.1.19-0.5.1
SUSE:Linux Enterprise Server 11 SP3 postgresql94 0 9.4.5-0.8.3
SUSE:Linux Enterprise Server 11 SP3 postgresql94-libs 0 9.4.5-0.8.3
SUSE:Linux Enterprise Server 11 SP3-TERADATA postgresql91 0 9.1.19-0.5.1
SUSE:Linux Enterprise Server 11 SP3-TERADATA postgresql94 0 9.4.5-0.8.3
SUSE:Linux Enterprise Server 11 SP3-TERADATA postgresql94-libs 0 9.4.5-0.8.3
SUSE:Linux Enterprise Server 11 SP4 postgresql94 0 9.4.5-0.8.3
SUSE:Linux Enterprise Server 11 SP4 postgresql94 0 9.4.6-0.14.3
SUSE:Linux Enterprise Server 11 SP4 postgresql94-libs 0 9.4.5-0.8.3
SUSE:Linux Enterprise Server 11 SP4 postgresql94-libs 0 9.4.6-0.14.3
SUSE:Linux Enterprise Server 12 postgresql-init 0 9.4-17.8.1
SUSE:Linux Enterprise Server 12 postgresql93 0 9.3.10-11.1
SUSE:Linux Enterprise Server 12 postgresql93-libs 0 9.3.10-11.1
SUSE:Linux Enterprise Server 12 postgresql94 0 9.4.5-4.5
SUSE:Linux Enterprise Server 12 postgresql94-libs 0 9.4.5-4.1
SUSE:Linux Enterprise Server for SAP Applications 11 SP3 postgresql91 0 9.1.19-0.5.1
SUSE:Linux Enterprise Server for SAP Applications 11 SP3 postgresql94 0 9.4.5-0.8.3
SUSE:Linux Enterprise Server for SAP Applications 11 SP3 postgresql94-libs 0 9.4.5-0.8.3
SUSE:Linux Enterprise Server for SAP Applications 11 SP4 postgresql94 0 9.4.5-0.8.3
SUSE:Linux Enterprise Server for SAP Applications 11 SP4 postgresql94 0 9.4.6-0.14.3
SUSE:Linux Enterprise Server for SAP Applications 11 SP4 postgresql94-libs 0 9.4.5-0.8.3
SUSE:Linux Enterprise Server for SAP Applications 11 SP4 postgresql94-libs 0 9.4.6-0.14.3
SUSE:Linux Enterprise Server for SAP Applications 12 postgresql-init 0 9.4-17.8.1
SUSE:Linux Enterprise Server for SAP Applications 12 postgresql93 0 9.3.10-11.1
SUSE:Linux Enterprise Server for SAP Applications 12 postgresql93-libs 0 9.3.10-11.1
SUSE:Linux Enterprise Server for SAP Applications 12 postgresql94 0 9.4.5-4.5
SUSE:Linux Enterprise Server for SAP Applications 12 postgresql94-libs 0 9.4.5-4.1
SUSE:Linux Enterprise Software Development Kit 11 SP3 postgresql91-libs 0 9.1.19-0.5.1
SUSE:Linux Enterprise Software Development Kit 11 SP3 postgresql94-libs 0 9.4.5-0.8.3
SUSE:Linux Enterprise Software Development Kit 11 SP4 postgresql94-libs 0 9.4.5-0.8.3
SUSE:Linux Enterprise Software Development Kit 11 SP4 postgresql94-libs 0 9.4.6-0.14.3
SUSE:Linux Enterprise Software Development Kit 12 postgresql93-libs 0 9.3.10-11.1
SUSE:Linux Enterprise Software Development Kit 12 postgresql94-libs 0 9.4.5-4.1
SUSE:Manager 2.1 postgresql91 0 9.1.19-0.5.1
SUSE:Manager 2.1 postgresql94 0 9.4.5-0.8.3
SUSE:Studio Onsite 1.3 postgresql91-libs 0 9.1.19-0.5.1
Ubuntu:14.04:LTS postgresql-9.1 0 9.1.19-0ubuntu0.14.04
Ubuntu:14.04:LTS postgresql-9.3 0 9.3.10-0ubuntu0.14.04
openSUSE:Tumbleweed postgresql93 0 9.3.15-1.1
openSUSE:Tumbleweed postgresql94 0 9.4.10-1.1
openSUSE:Tumbleweed postgresql95 0 9.5.4-1.2

Related vulnerabilities