Skip to content
OpenAdvisories
High ALAS2023-2025-1158 3 CVEs

Important: postgresql17 security update (Amazon Linux 2023)

Published Aug 21, 2025 · Updated Sep 8, 2025

Summary

Package updates are available for Amazon Linux 2023 that fix the following vulnerabilities: CVE-2025-8715: Improper neutralization of newlines in pg_dump in PostgreSQL allows a user of the origin server to inject arbitrary code for restore-time execution as the client operating system account running psql to restore the dump, via psql meta-commands inside a purpose-crafted object name. The same attacks can achieve SQL injection as a superuser of the restore target server. pg_dumpall, pg_restore, and pg_upgrade are also affected. Versions before PostgreSQL 17.6, 16.10, 15.14, 14.19, and 13.22 are affected. Versions before 11.20 are unaffected. CVE-2012-0868 had fixed this class of problem, but version 11.20 reintroduced it. CVE-2025-8714: Untrusted data inclusion in pg_dump in PostgreSQL allows a malicious superuser of the origin server to inject arbitrary code for restore-time execution as the client operating system account running psql to restore the dump, via psql meta-commands. pg_dumpall is also affected. pg_restore is affected when used to generate a plain-format dump. This is similar to MySQL CVE-2024-21096. Versions before PostgreSQL 17.6, 16.10, 15.14, 14.19, and 13.22 are affected. CVE-2025-8713: PostgreSQL optimizer statistics allow a user to read sampled data within a view that the user cannot access. Separately, statistics allow a user to read sampled data that a row security policy intended to hide. PostgreSQL maintains statistics for tables by sampling data available in columns; this data is consulted during the query planning process. Prior to this release, a user could craft a leaky operator that bypassed view access control lists (ACLs) and bypassed row security policies in partitioning or table inheritance hierarchies. Reachable statistics data notably included histograms and most-common-values lists. CVE-2017-7484 and CVE-2019-10130 intended to close this class of vulnerability, but this gap remained. Versions before PostgreSQL 17.6, 16.10, 15.14, 14.19, and 13.22 are affected.

Fixed packages 30

ReleasePackageFixed in
Amazon Linux · 2023 postgresql17 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-contrib 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-contrib-debuginfo 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-debuginfo 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-debugsource 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-docs 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-docs-debuginfo 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-llvmjit 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-llvmjit-debuginfo 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-plperl 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-plperl-debuginfo 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-plpython3 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-plpython3-debuginfo 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-pltcl 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-pltcl-debuginfo 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-private-devel 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-private-libs 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-private-libs-debuginfo 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-server 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-server-debuginfo 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-server-devel 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-server-devel-debuginfo 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-static 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-test 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-test-debuginfo 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-test-rpm-macros 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-upgrade 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-upgrade-debuginfo 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-upgrade-devel 0:17.6-1.amzn2023.0.1
Amazon Linux · 2023 postgresql17-upgrade-devel-debuginfo 0:17.6-1.amzn2023.0.1

Vulnerabilities 3

  • High 8.8
    CVE-2025-8714 Public exploit

    PostgreSQL pg_dump lets superuser of origin server execute arbitrary code in psql client

    Untrusted data inclusion in pg_dump in PostgreSQL allows a malicious superuser of the origin server to inject arbitrary code for restore-time execution as the client operating system account running psql to restore the dump, via psql meta-commands. pg_dumpall…

  • High 8.8

    PostgreSQL pg_dump newline in object name executes arbitrary code in psql client and in restore target server

    Improper neutralization of newlines in pg_dump in PostgreSQL allows a user of the origin server to inject arbitrary code for restore-time execution as the client operating system account running psql to restore the dump, via psql meta-commands inside a purpos…

  • Low 3.1

    PostgreSQL optimizer statistics can expose sampled data within a view, partition, or child table

    PostgreSQL optimizer statistics allow a user to read sampled data within a view that the user cannot access. Separately, statistics allow a user to read sampled data that a row security policy intended to hide. PostgreSQL maintains statistics for tables by sa…

References

  • web
    https://alas.aws.amazon.com/cve/html/CVE-2025-8713.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2025-8714.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2025-8715.html