From malufrj@gmail.com Mon Jul 23 14:00:54 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id AF76D9FB1DC for ; Mon, 23 Jul 2007 11:00:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 43259-02-8 for ; Mon, 23 Jul 2007 11:00:41 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.230]) by postgresql.org (Postfix) with ESMTP id 327D49FB7C5 for ; Mon, 23 Jul 2007 10:59:19 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 25so1003352wry for ; Mon, 23 Jul 2007 06:59:18 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=tXBKysLhzXftRb21fi3JoqeVFw+V0kUOPHZLW2gmuzFvemJzshpegt0XHAj+9e/CduyH88XbEN4r9vBtDyIITTFEewosKvCD/Rpp7ZMiXL0yMPXdFle8YeCdMLhZs8ObcNDyuyxdtnLzMyshpnvHHCn5txzYsQb5zOLdGF4fGpg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=UF61/h0QFpxeIwziQyfyjCZiWv+V+q8iQpP95OdyZo226kXrsWY/OwSdAiwnyyWmJgiDnGqZJjnfRUEodUnm9tMoWcELgVoMTFdbmVAvIOwI1CaujB9+UmkHJkm+unRaxIbBuv33yg8xPOVDgrM7Kv9cvvh3q1r+Hkhs75xI4Yg= Received: by 10.142.132.2 with SMTP id f2mr230030wfd.1185199157589; Mon, 23 Jul 2007 06:59:17 -0700 (PDT) Received: by 10.142.84.10 with HTTP; Mon, 23 Jul 2007 06:59:17 -0700 (PDT) Message-ID: Date: Mon, 23 Jul 2007 10:59:17 -0300 From: "Thiago Maluf" To: pgsql-admin@postgresql.org Subject: Disable access shell command in psql MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_126461_1371511.1185199157558" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/243 X-Sequence-Number: 26224 ------=_Part_126461_1371511.1185199157558 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello to everyone, I have one database server with postgresql 8.1 and I discovered yesterday one security problem. When I access my server with thought psql I have the possibility execute command in my server using "\!" or write one file using "\e". I want disable these options in my server but I searched it and not found. Can someone help me, please ? very thanks, Thiago ---------------------------------------------------------------- THIAGO MALUF RESENDE Consultor Voip e Programador WEB (Voip Developer and Web Developer) Tel: +55 21 86042100 e-mail: malufrj@gmail.com ------=_Part_126461_1371511.1185199157558 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello to everyone,
I have one database server with postgresql 8.1 and I discovered  yesterday  one  security problem.
When  I access my server with  thought psql I have the possibility execute command in my server using "\!" or write one file using "\e".
I want disable these options in my server but I searched it and not found.
Can someone help me, please ?
very thanks,
Thiago
----------------------------------------------------------------
THIAGO MALUF RESENDE
Consultor Voip e Programador WEB (Voip Developer and Web Developer)
Tel: +55 21 86042100
e-mail: malufrj@gmail.com ------=_Part_126461_1371511.1185199157558-- From mike@fuhr.org Mon Jul 23 14:16:48 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 37A809FB3CD for ; Mon, 23 Jul 2007 11:16:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 39266-03 for ; Mon, 23 Jul 2007 11:16:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 773B39FB79E for ; Mon, 23 Jul 2007 11:16:44 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id l6NEGbjY057782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 23 Jul 2007 08:16:40 -0600 (MDT) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.14.1/8.14.1) with ESMTP id l6NEGZEI007438; Mon, 23 Jul 2007 08:16:35 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.14.1/8.14.1/Submit) id l6NEGZ0t007437; Mon, 23 Jul 2007 08:16:35 -0600 (MDT) (envelope-from mfuhr) Date: Mon, 23 Jul 2007 08:16:35 -0600 From: Michael Fuhr To: Thiago Maluf Cc: pgsql-admin@postgresql.org Subject: Re: Disable access shell command in psql Message-ID: <20070723141634.GA7388@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/244 X-Sequence-Number: 26225 On Mon, Jul 23, 2007 at 10:59:17AM -0300, Thiago Maluf wrote: > I have one database server with postgresql 8.1 and I discovered yesterday > one security problem. > When I access my server with thought psql I have the possibility execute > command in my server using "\!" or write one file using "\e". > I want disable these options in my server but I searched it and not found. These psql commands run on the client with the privileges of the client; they don't allow the client to do anything it couldn't already do from the shell, and presumably the client already has access to the shell if it's running psql. This would be a security problem if you use psql to run SQL statements from an untrusted source, but if you're doing that then you already have a security problem. -- Michael Fuhr From tgl@sss.pgh.pa.us Mon Jul 23 14:26:31 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 55BE59FB24D for ; Mon, 23 Jul 2007 11:26:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 48627-01 for ; Mon, 23 Jul 2007 11:26:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 2612D9FB1BB for ; Mon, 23 Jul 2007 11:26:28 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l6NEQPR2024057; Mon, 23 Jul 2007 10:26:25 -0400 (EDT) To: "Thiago Maluf" cc: pgsql-admin@postgresql.org Subject: Re: Disable access shell command in psql In-reply-to: References: Comments: In-reply-to "Thiago Maluf" message dated "Mon, 23 Jul 2007 10:59:17 -0300" Date: Mon, 23 Jul 2007 10:26:25 -0400 Message-ID: <24056.1185200785@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/245 X-Sequence-Number: 26226 "Thiago Maluf" writes: > I have one database server with postgresql 8.1 and I discovered yesterday > one security problem. > When I access my server with thought psql I have the possibility execute > command in my server using "\!" or write one file using "\e". These are done on the client side, not the server side. There is no security issue here, because psql's user could equally well do the same things without using psql. regards, tom lane From malufrj@gmail.com Mon Jul 23 14:31:14 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id A98469FB5E6 for ; Mon, 23 Jul 2007 11:31:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 52278-10 for ; Mon, 23 Jul 2007 11:31:04 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.235]) by postgresql.org (Postfix) with ESMTP id 1EAA29FB6EF for ; Mon, 23 Jul 2007 11:31:11 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 25so1013902wry for ; Mon, 23 Jul 2007 07:31:09 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=rSIxZplgpynrAXiybAqYlp6LnnXCv20S9cnsNwHAmCCnxKQ/DTqqnyKmYWzkiUvfoPYrzFe3prCT3oVVjZBeAF2FaQQJ4HAuVROimzhCa/TMf+XqR0c28cAkacBnUQjukSP0MfVar1Ef8glI8RWtmnUz/VhEthhsMEP2sX28oZc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=La6MS4A7QUnH02SXcAADrNj7KGo3Lk0/q7AnV6egEm7w+OzLTA6B21GEQ/n7DgYMpjkrQTiNN76fxVrF3cbk7TtMA/CGtx5Wl+tV0C7k8jUe+n6wkMthgjMg5XN8TC6PtMZ7qZY3kZUAb51JGw50cuMjTmDxxcRC13Rhy7y2Pic= Received: by 10.142.77.11 with SMTP id z11mr238835wfa.1185201069160; Mon, 23 Jul 2007 07:31:09 -0700 (PDT) Received: by 10.142.84.10 with HTTP; Mon, 23 Jul 2007 07:31:09 -0700 (PDT) Message-ID: Date: Mon, 23 Jul 2007 11:31:09 -0300 From: "Thiago Maluf" To: "Tom Lane" Subject: Re: Disable access shell command in psql Cc: pgsql-admin@postgresql.org In-Reply-To: <24056.1185200785@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_126885_26547666.1185201069131" References: <24056.1185200785@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/246 X-Sequence-Number: 26227 ------=_Part_126885_26547666.1185201069131 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I`m sorry list. I had one mistake. Thanks for everyone. Thiago 2007/7/23, Tom Lane : > > "Thiago Maluf" writes: > > I have one database server with postgresql 8.1 and I > discovered yesterday > > one security problem. > > When I access my server with thought psql I have the possibility > execute > > command in my server using "\!" or write one file using "\e". > > These are done on the client side, not the server side. There is no > security issue here, because psql's user could equally well do the > same things without using psql. > > regards, tom lane > -- ---------------------------------------------------------------- THIAGO MALUF RESENDE Consultor Voip e Programador WEB (Voip Developer and Web Developer) Tel: +55 21 86042100 e-mail: malufrj@gmail.com ------=_Part_126885_26547666.1185201069131 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I`m sorry list.
I had one mistake.
Thanks for everyone.
Thiago

2007/7/23, Tom Lane <tgl@sss.pgh.pa.us>:
"Thiago Maluf" <malufrj@gmail.com> writes:
> I have one database server with postgresql 8.1 and I discovered  yesterday
> one  security problem.
> When  I access my server with  thought psql I have the possibility execute
> command in my server using "\!" or write one file using "\e".

These are done on the client side, not the server side.  There is no
security issue here, because psql's user could equally well do the
same things without using psql.

                        regards, tom lane



--
----------------------------------------------------------------
THIAGO MALUF RESENDE
Consultor Voip e Programador WEB (Voip Developer and Web Developer)
Tel: +55 21 86042100
e-mail: malufrj@gmail.com ------=_Part_126885_26547666.1185201069131--