Your submission was sent successfully! Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

You have successfully unsubscribed! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates about Ubuntu and upcoming events where you can meet our team.Close

CVE-2009-2940

Publication date 22 October 2009

Last updated 24 July 2024


Ubuntu priority

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.

Read the notes from the security team

Status

Package Ubuntu Release Status
pygresql 9.10 karmic
Not affected
9.04 jaunty
Not affected
8.10 intrepid
Fixed 1:3.8.1-3ubuntu0.1
8.04 LTS hardy
Fixed 1:3.8.1-2ubuntu0.1
6.06 LTS dapper Ignored end of life

Notes


jdstrand

1:4.0-0ubuntu1 and higher has the fix affected versions have an escape_string() and escape_bytea() that uses PQescapeString() and PQescapeBytea() from PostgreSQL's libpq-fe.h. These are known to be problematic. The fix is to create pg_escape_string() and pg_escape_bytea() which use the safe PQescapeStringConn() and PQescapeByteaConn() functions, and then add them to the pgobj methods. Applications will have to be rewritten to use the new functions, specifically, something like this: cnx = pg.connect(...) ... escaped = pg.escape_string(str) to be: cnx = pg.connect(...) ... escaped = cnx.escape_string(str)

Patch details

For informational purposes only. We recommend not to cherry-pick updates. How can I get the fixes?

Package Patch details
pygresql

References

Related Ubuntu Security Notices (USN)

    • USN-870-1
    • PyGreSQL vulnerability
    • 11 December 2009

Other references