PostgreSQL Encoding-Based SQL Injection Vulnerability
Secunia Advisory: SA20231
Release Date: 2006-05-24
Last Update: 2006-05-25
Popularity: 14,609 views

Critical:
Moderately critical
Impact: Manipulation of data
Where: From remote
Solution Status: Vendor Patch

Software:PostgreSQL 7.x
PostgreSQL 8.x

Subscribe: Instant alerts on relevant vulnerabilities

CVE reference:CVE-2006-2313
CVE-2006-2314


Description:
Two vulnerabilities have been reported in PostgreSQL, which potentially can be exploited by malicious people to conduct SQL injection attacks.

The vulnerabilities are caused due to the differences in the way PostgreSQL server and non encoding-aware applications interpret SQL query strings that contain certain multi-byte characters. A non encoding-aware application may insert escape characters into a malicious query string (e.g. to escape single-quote or backslash characters), without realizing that the escape characters will be interpreted as part of a multi-byte character sequence by the server. This can be exploited to conduct SQL injection attacks by injecting certain multi-byte characters into the query string.

Successful exploitation allows bypassing of SQL injection escaping code that are implemented in non encoding-aware applications.

The vulnerabilities have been reported in the 7.3, 7.4, 8.0 and 8.1 branch.

Solution:
Update to the fixed versions.
http://www.postgresql.org/download/

Version 7.3.x:
Update to version 7.3.15.

Version 7.4.x:
Update to version 7.4.13.

Version 8.0.x:
Update to version 8.0.8.

Version 8.1.x:
Update to version 8.1.4.

Provided and/or discovered by:
The vendor credits Akio Ishida and Yasuo Ohgaki.

Changelog:
2006-05-25: Updated credit section.

Original Advisory:
http://archives.postgresql.org/pgsql-announce/2006-05/msg00010.php
http://www.postgresql.org/docs/techdocs.50
http://www.postgresql.org/docs/8.1/static/release-7-3-15.html
http://www.postgresql.org/docs/8.1/static/release-7-4-13.html
http://www.postgresql.org/docs/8.1/static/release-8-0-8.html
http://www.postgresql.org/docs/8.1/static/release.html#RELEASE-8-1-4


Track this Secunia Advisory
Customers of the Secunia Vulnerability Intelligence solutions will automatically receive updates when new information regarding this advisory is released.

Read more about our Vulnerability Intelligence solutions and what they can do for you and your company.

About this Secunia Advisory
Please note: The information that this Secunia Advisory is based on comes from a third party unless stated otherwise.

Secunia collects, validates, and verifies all vulnerability reports issued by security research groups, vendors, and others.
  
Latest Advisories

Today
New advisories: 9
New vulnerabilities: 12
Updated advisories: 16

Moderately // 256 views
rPath update for libtiff
Highly // 252 views
Gentoo update for realplayer
Less // 251 views
Gentoo update for mysql
Moderately // 247 views
Gentoo update for dnsmasq
Highly // 255 views
Gentoo update for yelp

4th Sep, 2008
New advisories: 19
New vulnerabilities: 41
Updated advisories: 35


Solutions | More...  


Send Feedback to Secunia
If you have new information regarding this Secunia advisory or a product in our database, please send it to us using either our web form or email us at vuln@secunia.com.

Ideas, suggestions, and other feedback are most welcome.

Most Popular - 3 Hours

1. 3Com Wireless 8760 Access Point HTTP Request Processing Denial of Service // 126 views
2. HP OpenView Select Identity Connectors Information Disclosure // 72 views
3. Drupal Content Construction Kit Script Insertion Vulnerabilities // 71 views
4. Cisco ASA and PIX Security Appliances Multiple Vulnerabilities // 62 views
5. Gentoo update for yelp // 55 views
6. Gentoo update for mysql // 54 views
7. CS-Cart "cs_cookies" SQL Injection Vulnerability // 53 views
8. Gentoo update for dnsmasq // 52 views
9. Gentoo update for realplayer // 52 views
10. rPath update for libtiff // 51 views