Debian Security Advisory DSA 2658-1 (postgresql-9.1 - several vulnerabilities)

Summary
Several vulnerabilities were discovered in PostgreSQL database server. CVE-2013-1899Mitsumasa Kondo and Kyotaro Horiguchi of NTT Open Source Software Center discovered that it was possible for a connection request containing a database name that begins with - to be crafted that can damage or destroy files within a server's data directory. Anyone with access to the port the PostgreSQL server listens on can initiate this request. CVE-2013-1900 Random numbers generated by contrib/pgcrypto functions may be easy for another database user to guess. CVE-2013-1901 An unprivileged user could run commands that could interfere with in-progress backups.
Solution
For the stable distribution (squeeze), postgresql-9.1 is not available. DSA-2657-1 has been released for CVE-2013-1900 affecting posgresql-8.4. For the testing distribution (wheezy), these problems have been fixed in version 9.1.9-0wheezy1. For the unstable distribution (sid), these problems have been fixed in version 9.1.9-1. We recommend that you upgrade your postgresql-9.1 packages.
Insight
PostgreSQL is a fully featured object-relational database management system. It supports a large part of the SQL standard and is designed to be extensible by users in many aspects. Some of the features are: ACID transactions, foreign keys, views, sequences, subqueries, triggers, user-defined types and functions, outer joins, multiversion concurrency control. Graphical user interfaces and bindings for many programming languages are available as well.
Affected
postgresql-9.1 on Debian Linux
Detection
This check tests the installed software version using the apt package manager.
References