Synopsis
The remote Amazon Linux 2 host is missing a security update.
Description
The version of postgresql installed on the remote host is prior to 13.22-1. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2POSTGRESQL13-2025-012 advisory.
    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. (CVE-2025-8713)
    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-8714)
    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-8715)
Tenable has extracted the preceding description block directly from the tested product security advisory.
Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.
Solution
Run 'yum update postgresql' or   or 'yum update --advisory ALAS2POSTGRESQL13-2025-012' to update your system.
Plugin Details
File Name: al2_ALASPOSTGRESQL13-2025-012.nasl
Agent: unix
Supported Sensors: Frictionless Assessment AWS, Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Continuous Assessment, Nessus
Risk Information
Vector: CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C
Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C
Vulnerability Information
CPE: p-cpe:/a:amazon:linux:postgresql-docs, p-cpe:/a:amazon:linux:postgresql-test, p-cpe:/a:amazon:linux:postgresql-pltcl, cpe:/o:amazon:linux:2, p-cpe:/a:amazon:linux:postgresql-private-libs, p-cpe:/a:amazon:linux:postgresql-server, p-cpe:/a:amazon:linux:postgresql-test-rpm-macros, p-cpe:/a:amazon:linux:postgresql-contrib, p-cpe:/a:amazon:linux:postgresql-plpython3, p-cpe:/a:amazon:linux:postgresql-upgrade-devel, p-cpe:/a:amazon:linux:postgresql-server-devel, p-cpe:/a:amazon:linux:postgresql-llvmjit, p-cpe:/a:amazon:linux:postgresql-debuginfo, p-cpe:/a:amazon:linux:postgresql-static, p-cpe:/a:amazon:linux:postgresql-plperl, p-cpe:/a:amazon:linux:postgresql-upgrade, p-cpe:/a:amazon:linux:postgresql-private-devel, p-cpe:/a:amazon:linux:postgresql
Required KB Items: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list
Exploit Ease: Exploits are available
Patch Publication Date: 9/4/2025
Vulnerability Publication Date: 8/14/2025