Live data from Hacker News

PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

postgresql.org

1–10 of 105 posts

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#6

So if I have no databases that start with "-", I'm not vulnerable? Didn't quite understand what they meant by that.

Just from the quote cited by octo_t I would read that you are still vulnerable: A malicious database user could craft a _connection string_ which contains a database name starting with -. There's no hint that the database has to exist on your server for this to work, so I would read it could be a complete bogus request and still damage your files.

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#9

So if I have no databases that start with "-", I'm not vulnerable? Didn't quite understand what they meant by that.

From the FAQ originally shared by edwinvlieg, you are still vulnerable:

The vulnerability allows users to use a command-line switch for a PostgreSQL connection intended for single-user recovery mode while PostgreSQL is running in normal, multiuser mode. This can be used to harm the server.

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#10

So if I have no databases that start with "-", I'm not vulnerable? Didn't quite understand what they meant by that.

Nope. Looking at the release notes:

> Fix insecure parsing of server command-line switches (Mitsumasa Kondo, Kyotaro Horiguchi)

So I assume command-line switch parsing is somehow involved in parsing the connection string (probably because the same connection strings can be used from API and from CLI?), I guess a database name with a leading `-` can be interpreted as a switch and execute corrupting commands.

edit: according to the dedicated FAQ:

> The vulnerability allows users to use a command-line switch for a PostgreSQL connection intended for single-user recovery mode while PostgreSQL is running in normal, multiuser mode. This can be used to harm the server.

Post reply on HN