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.
https://github.com/advisories/GHSA-xv6x-43gq-4hfj
http://www.debian.org/security/2009/dsa-1911
http://ubuntu.com/usn/usn-870-1