QID 357320

Date Published: 2024-03-07

QID 357320: Amazon Linux Security Advisory for postgresql : ALAS2POSTGRESQL14-2024-006

Late privilege drop in refresh materialized view concurrently in postgresql allows an object creator to execute arbitrary sql functions as the command issuer.
The command intends to run sql functions as the owner of the materialized view, enabling safe refresh of untrusted materialized views.
The victim is a superuser or member of one of the attacker's roles.
The attack requires luring the victim into running refresh materialized view concurrently on the attacker's materialized view.
As part of exploiting this vulnerability, the attacker creates functions that use create rule to convert the internally-built temporary table to a view.
Versions before postgresql 15.6, 14.11, 13.14, and 12.18 are affected.
The only known exploit does not work in postgresql 16 and later.
For defense in depth, postgresql 16.2 adds the protections that older branches are using to fix their vulnerability. (
( CVE-2024-0985)



Note: The preceding description block is extracted directly from the security advisory. Using automation, we have attempted to clean and format it as much as possible without introducing additional issues.

Successful exploitation of this vulnerability could lead to a securitybreach or could affect integrity, availability, and confidentiality.

  • CVSS V3 rated as High - 8 severity.
  • CVSS V2 rated as Medium - 5.4 severity.
  • Solution
    Please refer to Amazon advisory: ALAS2POSTGRESQL14-2024-006 for affected packages and patching details, or update with your package manager.
    Vendor References

    CVEs related to QID 357320

    Software Advisories
    Advisory ID Software Component Link
    ALAS2POSTGRESQL14-2024-006 amazon linux 2 URL Logo alas.aws.amazon.com/AL2/ALASPOSTGRESQL14-2024-006.html