Debian DLA-1874-1 : postgresql-9.4 security update

high Nessus Plugin ID 127483

Synopsis

The remote Debian host is missing a security update.

Description

- CVE-2019-10208: `TYPE` in `pg_temp` executes arbitrary SQL during `SECURITY DEFINER` execution

Versions Affected: 9.4 - 11

Given a suitable `SECURITY DEFINER` function, an attacker can execute arbitrary SQL under the identity of the function owner. An attack requires `EXECUTE` permission on the function, which must itself contain a function call having inexact argument type match. For example, `length('foo'::varchar)` and `length('foo')` are inexact, while `length('foo'::text)` is exact. As part of exploiting this vulnerability, the attacker uses `CREATE DOMAIN` to create a type in a `pg_temp` schema. The attack pattern and fix are similar to that for CVE-2007-2138.

Writing `SECURITY DEFINER` functions continues to require following the considerations noted in the documentation :

https://www.postgresql.org/docs/devel/sql-createfunction.html#SQL-CREA TEFUNCTION-SECURITY

The PostgreSQL project thanks Tom Lane for reporting this problem.

For Debian 8 'Jessie', this problem has been fixed in version 9.4.24-0+deb8u1.

We recommend that you upgrade your postgresql-9.4 packages.

NOTE: Tenable Network Security has extracted the preceding description block directly from the DLA security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.

Solution

Upgrade the affected packages.

See Also

https://lists.debian.org/debian-lts-announce/2019/08/msg00007.html

https://packages.debian.org/source/jessie/postgresql-9.4

http://www.nessus.org/u?16992e29

Plugin Details

Severity: High

ID: 127483

File Name: debian_DLA-1874.nasl

Version: 1.8

Type: local

Agent: unix

Published: 8/12/2019

Updated: 1/11/2021

Supported Sensors: Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.9

CVSS v2

Risk Factor: Medium

Base Score: 6.5

Temporal Score: 4.8

Vector: CVSS2#AV:N/AC:L/Au:S/C:P/I:P/A:P

CVSS Score Source: CVE-2019-10208

CVSS v3

Risk Factor: High

Base Score: 8.8

Temporal Score: 7.7

Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:U/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:debian:debian_linux:libecpg-compat3, p-cpe:/a:debian:debian_linux:libecpg-dev, p-cpe:/a:debian:debian_linux:libecpg6, p-cpe:/a:debian:debian_linux:libpgtypes3, p-cpe:/a:debian:debian_linux:libpq-dev, p-cpe:/a:debian:debian_linux:libpq5, p-cpe:/a:debian:debian_linux:postgresql-9.4, p-cpe:/a:debian:debian_linux:postgresql-9.4-dbg, p-cpe:/a:debian:debian_linux:postgresql-client-9.4, p-cpe:/a:debian:debian_linux:postgresql-contrib-9.4, p-cpe:/a:debian:debian_linux:postgresql-doc-9.4, p-cpe:/a:debian:debian_linux:postgresql-plperl-9.4, p-cpe:/a:debian:debian_linux:postgresql-plpython-9.4, p-cpe:/a:debian:debian_linux:postgresql-plpython3-9.4, p-cpe:/a:debian:debian_linux:postgresql-pltcl-9.4, p-cpe:/a:debian:debian_linux:postgresql-server-dev-9.4, cpe:/o:debian:debian_linux:8.0

Required KB Items: Host/local_checks_enabled, Host/Debian/release, Host/Debian/dpkg-l

Exploit Ease: No known exploits are available

Patch Publication Date: 8/9/2019

Vulnerability Publication Date: 10/29/2019

Reference Information

CVE: CVE-2019-10208

IAVB: 2019-B-0072-S