CVE-2023-39417: Extension script @substitutions@ within quoting allow SQL injection. Supported, Vulnerable Versions: 11 - 15. The security team typically does not test unsupported versions, but this problem is quite old. An extension script is vulnerable if it uses @extowner@, @extschema@, or @extschema:...@ inside a quoting construct (dollar quoting, '', or ""). No bundled extension is vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite is an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enables an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. PostgreSQL will block this attack in the core server, so there's no need to modify individual extensions. The PostgreSQL project thanks Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg for reporting this problem. CVE-2023-39418: MERGE fails to enforce UPDATE or SELECT row security policies. Supported, Vulnerable Versions: 15. PostgreSQL 15 introduced the MERGE command, which fails to test new rows against row security policies defined for UPDATE and SELECT. If UPDATE and SELECT policies forbid some row that INSERT policies do not forbid, a user could store such rows. Subsequent consequences are application-dependent. This affects only databases that have used CREATE POLICY to define a row security policy. The PostgreSQL project thanks Dean Rasheed for reporting this problem.
We can go off the fixed version table here: https://www.postgresql.org/support/security/CVE-2023-39417/ That is, the fixes are: 11.21, 12.16, 13.12, 14.9, 15.4.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/data/glsa.git/commit/?id=7240eff2e6b5c1e8d1af9a65cfa3c6c31e355595 commit 7240eff2e6b5c1e8d1af9a65cfa3c6c31e355595 Author: GLSAMaker <glsamaker@gentoo.org> AuthorDate: 2024-08-07 08:28:46 +0000 Commit: Hans de Graaff <graaff@gentoo.org> CommitDate: 2024-08-07 08:29:00 +0000 [ GLSA 202408-06 ] PostgreSQL: Multiple Vulnerabilities Bug: https://bugs.gentoo.org/903193 Bug: https://bugs.gentoo.org/912251 Bug: https://bugs.gentoo.org/917153 Bug: https://bugs.gentoo.org/924110 Bug: https://bugs.gentoo.org/931849 Signed-off-by: GLSAMaker <glsamaker@gentoo.org> Signed-off-by: Hans de Graaff <graaff@gentoo.org> glsa-202408-06.xml | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+)