Incorrect control of environment variables in PostgreSQL PL/Perl allows an unprivileged database user to change sensitive process environment variables (e.g. PATH). That often suffices to enable arbitrary code execution, even if the attacker lacks a database server operating system user. Versions before PostgreSQL 17.1, 16.5, 15.9, 14.14, 13.17, and 12.21 are affected.
https://www.varonis.com/blog/cve-postgresql-pl/perl
https://www.darkreading.com/vulnerabilities-threats/varonis-warns-bug-discovered-postgresql-pl-perl
https://www.postgresql.org/support/security/CVE-2024-10979/
https://github.com/fmora50591/postgresql-env-vuln/blob/main/README.md