Re: PCI:SSF - Safe SQL Query & operators filter - Mailing list pgsql-general

From Jeffrey Walton
Subject Re: PCI:SSF - Safe SQL Query & operators filter
Date
Msg-id CAH8yC8kM6wsDRjrQ=nmEME71nOLoefmJCy4SQbBGwUmwENAr8A@mail.gmail.com
Whole thread Raw
In response to PCI:SSF - Safe SQL Query & operators filter  (Jan Bilek <jan.bilek@eftlab.com.au>)
List pgsql-general
On Mon, Nov 7, 2022 at 8:25 PM Jan Bilek <jan.bilek@eftlab.com.au> wrote:
> ...
> select * from pg_read_file('/etc/passwd' , 0 , 1000000); -> it's possible to display content of '/etc/passwd/' file
> select version(); -> Result of DBMS version request.

Input filtering may help in the interim, until you get the roles and
privileges sorted out.

> COPY (SELECT 'nc -lvvp 2346 -e /bin/bash') TO '/tmp/pentestlab'; -> it's possible to create files on the filesystem
onbehalf of 'postgres' user.
 

Prepared Statement or Parameterized Query here. In this case, don't
execute data as code.

Jeff



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: PCI:SSF - Safe SQL Query & operators filter
Next
From: Laurenz Albe
Date:
Subject: Re: PCI:SSF - Safe SQL Query & operators filter