Re: How easy is it to lose permissions in 'public' schema? - Mailing list pgsql-general

From Tom Lane
Subject Re: How easy is it to lose permissions in 'public' schema?
Date
Msg-id 716865.1649723685@sss.pgh.pa.us
Whole thread Raw
In response to Re: How easy is it to lose permissions in 'public' schema?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: How easy is it to lose permissions in 'public' schema?  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 4/11/22 16:10, Rob Sargent wrote:
>> I've just bumped into this.
>>
>> barnard=> select public.genome_threshold_mono('a'::text,'b'::text);
>> ERROR:  permission denied for schema public
>> LINE 1: select public.genome_threshold_mono('a'::text,'b'::text);
>>
>> I know I haven't intentionally removed 'public' from grantee's purview
>> and short of the code block above not actually getting run, any guesses
>> as to how access to 'public' got removed from grantee?

> I'm going to say someone read this:
> https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058:_Protect_Your_Search_Path
> And did something along the line of this:
> REVOKE CREATE ON SCHEMA public FROM PUBLIC;

Note that that only recommends removing CREATE, though, not USAGE
which is what Rob seems to be lacking.

            regards, tom lane



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: How easy is it to lose permissions in 'public' schema?
Next
From: Adrian Klaver
Date:
Subject: Re: How easy is it to lose permissions in 'public' schema?