exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

PostgreSQL-8.1.4.txt

PostgreSQL-8.1.4.txt
Posted May 26, 2006
Site postgresql.org

An attacker able to submit crafted strings to an application that will embed those strings in SQL commands can use invalidly-encoded multibyte characters to bypass standard string-escaping methods, resulting in possible injection of hostile SQL commands into the database. The attacks covered here work in any multibyte encoding. Affected versions: PostgreSQL 8.1.0-8.1.3, 8.0.0-8.0.7, 7.4.0-7.4.12, 7.3.0-7.3.14

tags | advisory
SHA-256 | 1f24512224697c2721795629e394e65c7d12647d4fe34a0ce2f1d81d2f134330

PostgreSQL-8.1.4.txt

Change Mirror Download
PostgreSQL versions 8.1.4, 8.0.8, 7.4.13 and 7.3.15 have been released 
fixing two security issues.


Details of vulnerability 1
--------------------------
Vulnerability type: SQL Injection
Remotely exploitable: Depends on client

Affected versions: PostgreSQL 8.1.0-8.1.3, 8.0.0-8.0.7,
7.4.0-7.4.12, 7.3.0-7.3.14
Fixed versions: PostgreSQL 8.1.4, 8.0.8, 7.4.13, 7.3.15

Affected platforms: All

CVE: CVE-2006-2313
(http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-2313)


Vulnerability description
-------------------------
An attacker able to submit crafted strings to an application that will
embed those strings in SQL commands can use invalidly-encoded multibyte
characters to bypass standard string-escaping methods, resulting in
possible injection of hostile SQL commands into the database. The
attacks covered here work in any multibyte encoding.


Details of vulnerability 2
--------------------------
Vulnerability type: SQL Injection
Remotely exploitable: Depends on client

Affected versions: PostgreSQL 8.1.0-8.1.3, 8.0.0-8.0.7,
7.4.0-7.4.12, 7.3.0-7.3.14
Fixed versions: PostgreSQL 8.1.4, 8.0.8, 7.4.13, 7.3.15

Affected platforms: All

CVE: CVE-2006-2314
(http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-2314)


Vulnerability description
-------------------------
The widely-used practice of escaping ASCII single quote "'" by turning
it into "\'" is unsafe when operating in multibyte encodings that allow
0x5c (ASCII code for backslash) as the trailing byte of a multibyte
character; this includes at least SJIS, BIG5, GBK, GB18030, and UHC. An
application that uses this conversion while embedding untrusted strings
in SQL commands is vulnerable to SQL-injection attacks if it
communicates with the server in one of these encodings. While the
standard client libraries used with PostgreSQL have escaped "'" in the
safe, SQL-standard way of "''" for some time, the older practice remains
common. As of PostgreSQL versions 8.1.4, 8.0.8, 7.4.13 and 7.3.15, the
server has been modified to reject "\'" when the client is using one of
these encodings.
This does NOT in itself fix all variants of the problem, but it will
make it obvious that such a client is broken and in need of repair.


More information is available on the PostgreSQL website at
http://www.postgresql.org/docs/techdocs.52.



Solution
--------
Upgrade to version 8.1.4, 8.0.8, 7.4.13 or 7.3.15 respectively,
available from http://www.postgresql.org/ftp/ in both source and binary
formats.


Mitigating factors
------------------
* If client_encoding is a single-byte encoding (e.g., one of the
LATINx family), there is no vulnerability.

* If both client and server encoding is UTF8, there is no vulnerability.

* If application always sends untrusted strings as out-of-line
parameters, instead of embedding them into SQL commands, it is not
vulnerable. This is only available in PostgreSQL 7.4 or later.

* If application cannot pass invalidly encoded data to the server,
there is no vulnerability (this probably includes all Java and .Net
applications, for example, because of the platforms handling of
Unicode strings).


Workarounds
-----------
* Changing to a non-multibyte client_encoding will protect against
both vulnerabilities.

* Changing to UTF8 encoding and upgrading to a fixed version of
PostgreSQL will protect the system without client side changes.


Credits
-------
The PostgreSQL Global Development Group thanks Akio Ishida and Yasuo
Ohgaki for reporting these vulnerabilities.



Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    69 Files
  • 14
    Nov 14th
    0 Files
  • 15
    Nov 15th
    0 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close