From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | "cc(at)sse-ag(dot)ch" <cc(at)sse-ag(dot)ch>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Potential vuln in example for "F.25.1.1. digest()" |
Date: | 2021-08-17 18:06:34 |
Message-ID: | CAKFQuwZVWK8J3Nw+f=ERH_2hG6iFTVkOc0ciDX1a8vnAb11+HQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Tuesday, August 17, 2021, PG Doc comments form <noreply(at)postgresql(dot)org>
wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/13/pgcrypto.html
> Description:
>
> Hi,
> in "F.25.1.1. digest()" you suggest:
>
> CREATE OR REPLACE FUNCTION sha1(bytea) returns text AS $$
> SELECT encode(digest($1, 'sha1'), 'hex')
> $$ LANGUAGE SQL STRICT IMMUTABLE;
>
> While this is a great example, it may expose a database app to
> vulnerabilities if the attacker succeeds in overriding the function
> sha1(...) in the app's user context (schema)
>
You should read this:
https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058%3A_Protect_Your_Search_Path
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-08-17 18:33:17 | Re: Potential vuln in example for "F.25.1.1. digest()" |
Previous Message | PG Doc comments form | 2021-08-17 16:11:53 | Potential vuln in example for "F.25.1.1. digest()" |