PostgreSQL versions 10.x before 10.9 and versions 11.x before 11.4 are vulnerable to a stack-based buffer overflow. Any authenticated user can overflow a stack-based buffer by changing the user's own password to a purpose-crafted value. This often suffices to execute arbitrary code as the PostgreSQL operating system account.
https://www.postgresql.org/about/news/1949/
https://security.gentoo.org/glsa/202003-03
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-10164
http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00035.html