The pygresql module 3.8.1 and 4.0 for Python does not properly support the PQescapeStringConn function, which might allow remote attackers to leverage escaping issues involving multibyte character encodings.
http://www.debian.org/security/2009/dsa-1911
http://ubuntu.com/usn/usn-870-1