Executive Summary

Summary
Title PostgreSQL server/client vulnerabilities
Informations
Name USN-288-2 First vendor Publication 2006-06-09
Vendor Ubuntu Last vendor Modification 2006-06-09
Severity (Vendor) N/A Revision N/A

Security-Database Scoring CVSS v3

Cvss vector : N/A
Overall CVSS Score NA
Base Score NA Environmental Score NA
impact SubScore NA Temporal Score NA
Exploitabality Sub Score NA
 
Calculate full CVSS 3.0 Vectors scores

Security-Database Scoring CVSS v2

Cvss vector : (AV:N/AC:L/Au:N/C:P/I:P/A:P)
Cvss Base Score 7.5 Attack Range Network
Cvss Impact Score 6.4 Attack Complexity Low
Cvss Expoit Score 10 Authentication None Required
Calculate full CVSS 2.0 Vectors scores

Detail

A security issue affects the following Ubuntu releases:

Ubuntu 6.06 LTS

This advisory also applies to the corresponding versions of Kubuntu, Edubuntu, and Xubuntu.

The problem can be corrected by upgrading your system to the following package versions:

Ubuntu 6.06 LTS:
libpq-dev 8.1.4-0ubuntu1
libpq4 8.1.4-0ubuntu1
postgresql-8.1 8.1.4-0ubuntu1
postgresql-client-8.1 8.1.4-0ubuntu1
postgresql-contrib-8.1 8.1.4-0ubuntu1

After a standard system upgrade you need to restart all services that use PostgreSQL to effect the necessary changes. If you can afford it, rebooting the computer is the easiest way of ensuring that all running services use the updated client library.

Details follow:

USN-288-1 fixed two vulnerabilities in Ubuntu 5.04 and Ubuntu 5.10. This update fixes the same vulnerabilities for Ubuntu 6.06 LTS.

For reference, these are the details of the original USN:

CVE-2006-2313:
Akio Ishida and Yasuo Ohgaki discovered a weakness in the handling of
invalidly-encoded multibyte text data. If a client application
processed untrusted input without respecting its encoding and applied
standard string escaping techniques (such as replacing a single quote
>>'<< with >>\'<< or >>''<<), the PostgreSQL server could interpret the
resulting string in a way that allowed an attacker to inject arbitrary
SQL commands into the resulting SQL query. The PostgreSQL server has
been modified to reject such invalidly encoded strings now, which
completely fixes the problem for some 'safe' multibyte encodings like
UTF-8.

CVE-2006-2314:
However, there are some less popular and client-only multibyte
encodings (such as SJIS, BIG5, GBK, GB18030, and UHC) which contain
valid multibyte characters that end with the byte 0x5c, which is the
representation of the backslash character >>\<< in ASCII. Many client
libraries and applications use the non-standard, but popular way of
escaping the >>'<< character by replacing all occurences of it with
>>\'<<. If a client application uses one of the affected encodings and
does not interpret multibyte characters, and an attacker supplies a
specially crafted byte sequence as an input string parameter, this
escaping method would then produce a validly-encoded character and
an excess >>'<< character which would end the string. All subsequent
characters would then be interpreted as SQL code, so the attacker
could execute arbitrary SQL commands.

To fix this vulnerability end-to-end, client-side applications must
be fixed to properly interpret multibyte encodings and use >>''<<
instead of >>\'<<. However, as a precautionary measure, the sequence
>>\'<< is now regarded as invalid when one of the affected client
encodings is in use. If you depend on the previous behaviour, you
can restore it by setting 'backslash_quote = on' in postgresql.conf.
However, please be aware that this could render you vulnerable
again.

This issue does not affect you if you only use single-byte (like
SQL_ASCII or the ISO-8859-X family) or unaffected multibyte (like
UTF-8) encodings.

Please see http://www.postgresql.org/docs/techdocs.50 for further
details.

Original Source

Url : http://www.ubuntu.com/usn/USN-288-2

OVAL Definitions

Definition Id: oval:org.mitre.oval:def:10618
 
Oval ID: oval:org.mitre.oval:def:10618
Title: PostgreSQL 8.1.x before 8.1.4, 8.0.x before 8.0.8, 7.4.x before 7.4.13, 7.3.x before 7.3.15, and earlier versions allows context-dependent attackers to bypass SQL injection protection methods in applications via invalid encodings of multibyte characters, aka one variant of "Encoding-Based SQL Injection."
Description: PostgreSQL 8.1.x before 8.1.4, 8.0.x before 8.0.8, 7.4.x before 7.4.13, 7.3.x before 7.3.15, and earlier versions allows context-dependent attackers to bypass SQL injection protection methods in applications via invalid encodings of multibyte characters, aka one variant of "Encoding-Based SQL Injection."
Family: unix Class: vulnerability
Reference(s): CVE-2006-2313
Version: 5
Platform(s): Red Hat Enterprise Linux 3
CentOS Linux 3
Red Hat Enterprise Linux 4
CentOS Linux 4
Oracle Linux 4
Product(s):
Definition Synopsis:
Definition Id: oval:org.mitre.oval:def:9947
 
Oval ID: oval:org.mitre.oval:def:9947
Title: PostgreSQL 8.1.x before 8.1.4, 8.0.x before 8.0.8, 7.4.x before 7.4.13, 7.3.x before 7.3.15, and earlier versions allows context-dependent attackers to bypass SQL injection protection methods in applications that use multibyte encodings that allow the "\" (backslash) byte 0x5c to be the trailing byte of a multibyte character, such as SJIS, BIG5, GBK, GB18030, and UHC, which cannot be handled correctly by a client that does not understand multibyte encodings, aka a second variant of "Encoding-Based SQL Injection." NOTE: it could be argued that this is a class of issue related to interaction errors between the client and PostgreSQL, but a CVE has been assigned since PostgreSQL is treating this as a preventative measure against this class of problem.
Description: PostgreSQL 8.1.x before 8.1.4, 8.0.x before 8.0.8, 7.4.x before 7.4.13, 7.3.x before 7.3.15, and earlier versions allows context-dependent attackers to bypass SQL injection protection methods in applications that use multibyte encodings that allow the "\" (backslash) byte 0x5c to be the trailing byte of a multibyte character, such as SJIS, BIG5, GBK, GB18030, and UHC, which cannot be handled correctly by a client that does not understand multibyte encodings, aka a second variant of "Encoding-Based SQL Injection." NOTE: it could be argued that this is a class of issue related to interaction errors between the client and PostgreSQL, but a CVE has been assigned since PostgreSQL is treating this as a preventative measure against this class of problem.
Family: unix Class: vulnerability
Reference(s): CVE-2006-2314
Version: 5
Platform(s): Red Hat Enterprise Linux 3
CentOS Linux 3
Red Hat Enterprise Linux 4
CentOS Linux 4
Oracle Linux 4
Product(s):
Definition Synopsis:

CPE : Common Platform Enumeration

TypeDescriptionCount
Application 40

OpenVAS Exploits

Date Description
2009-02-27 Name : Fedora Update for php-pear-DB FEDORA-2007-0249
File : nvt/gb_fedora_2007_0249_php-pear-DB_fc7.nasl
2008-09-24 Name : Gentoo Security Advisory GLSA 200607-04 (postgresql)
File : nvt/glsa_200607_04.nasl
2008-09-04 Name : FreeBSD Ports: postgresql, postgresql-server, ja-postgresql
File : nvt/freebsd_postgresql2.nasl
2008-01-17 Name : Debian Security Advisory DSA 1087-1 (postgresql)
File : nvt/deb_1087_1.nasl

Open Source Vulnerability Database (OSVDB)

Id Description
25731 PostgreSQL Single Quote Escaping Filter Bypass

PostgreSQL contains a flaw that may allow a malicious user to bypass security restrictions and execute arbitrary SQL commands. The issue is triggered due to an error when escaping ASCII single quote "'" characters (by turning them into "\'") and operating in multibyte encodings (e.g. SJIS, BIG5, GBK, GB18030, or UHC) that allow using the "0x5c" ASCII code (backslash) as the trailing byte of a multibyte character. It is possible that the flaw may allow SQL injection attacks resulting in a loss of confidentiality and integrity.
25730 PostgreSQL Invalidly-encoded Multibyte Character String Escaping Bypass

Nessus® Vulnerability Scanner

Date Description
2007-11-10 Name : The remote Ubuntu host is missing one or more security-related patches.
File : ubuntu_USN-288-2.nasl - Type : ACT_GATHER_INFO
2007-11-10 Name : The remote Ubuntu host is missing one or more security-related patches.
File : ubuntu_USN-288-3.nasl - Type : ACT_GATHER_INFO
2007-11-06 Name : The remote Fedora host is missing a security update.
File : fedora_2007-0249.nasl - Type : ACT_GATHER_INFO
2007-10-17 Name : The remote openSUSE host is missing a security update.
File : suse_dovecot-1987.nasl - Type : ACT_GATHER_INFO
2007-10-17 Name : The remote openSUSE host is missing a security update.
File : suse_postgresql-1443.nasl - Type : ACT_GATHER_INFO
2007-10-17 Name : The remote openSUSE host is missing a security update.
File : suse_postgresql-server-1442.nasl - Type : ACT_GATHER_INFO
2007-01-17 Name : The remote Fedora Core host is missing a security update.
File : fedora_2006-578.nasl - Type : ACT_GATHER_INFO
2007-01-17 Name : The remote Fedora Core host is missing a security update.
File : fedora_2006-579.nasl - Type : ACT_GATHER_INFO
2006-10-14 Name : The remote Debian host is missing a security-related update.
File : debian_DSA-1087.nasl - Type : ACT_GATHER_INFO
2006-08-14 Name : The remote FreeBSD host is missing one or more security-related updates.
File : freebsd_pkg_17f53c1d2ae911dba6e2000e0c2e438a.nasl - Type : ACT_GATHER_INFO
2006-07-10 Name : The remote Gentoo host is missing one or more security-related patches.
File : gentoo_GLSA-200607-04.nasl - Type : ACT_GATHER_INFO
2006-07-03 Name : The remote CentOS host is missing one or more security updates.
File : centos_RHSA-2006-0526.nasl - Type : ACT_GATHER_INFO
2006-06-16 Name : The remote host is missing a vendor-supplied security patch
File : suse_SA_2006_030.nasl - Type : ACT_GATHER_INFO
2006-06-08 Name : The remote Mandrake Linux host is missing one or more security updates.
File : mandrake_MDKSA-2006-098.nasl - Type : ACT_GATHER_INFO
2006-05-29 Name : The remote Ubuntu host is missing one or more security-related patches.
File : ubuntu_USN-288-1.nasl - Type : ACT_GATHER_INFO
2006-05-24 Name : The remote Red Hat host is missing one or more security updates.
File : redhat-RHSA-2006-0526.nasl - Type : ACT_GATHER_INFO

Alert History

If you want to see full details history, please login or register.
0
1
Date Informations
2014-02-17 12:03:28
  • Multiple Updates
2013-05-11 12:25:27
  • Multiple Updates