| Source | Link |
|---|---|
| postgresql | www.postgresql.org/support/versioning/ |
#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc
#
include('deprecated_nasl_level.inc');
include('compat.inc');
if (description)
{
script_id(63347);
script_version("1.29");
script_set_attribute(attribute:"plugin_modification_date", value:"2026/04/28");
script_xref(name:"IAVA", value:"0001-A-0583");
script_name(english:"PostgreSQL Unsupported Version Detection");
script_set_attribute(attribute:"synopsis", value:
"The remote host is running an unsupported version of a database
server.");
script_set_attribute(attribute:"description", value:
"According to its self-reported version number, the installation of
PostgreSQL on the remote host is no longer supported.
Lack of support implies that no new security patches for the product
will be released by the vendor. As a result, it is likely to contain
security vulnerabilities.");
script_set_attribute(attribute:"see_also", value:"https://www.postgresql.org/support/versioning/");
script_set_attribute(attribute:"solution", value:
"Upgrade to a version of PostgreSQL that is currently supported.");
script_set_attribute(attribute:"agent", value:"all");
script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H");
script_set_attribute(attribute:"cvss_score_source", value:"manual");
script_set_attribute(attribute:"cvss_score_rationale", value:"This version of the software is no longer supported.");
script_set_attribute(attribute:"plugin_publication_date", value:"2012/12/28");
script_set_attribute(attribute:"plugin_type", value:"combined");
script_set_attribute(attribute:"cpe", value:"cpe:/a:postgresql:postgresql");
script_set_attribute(attribute:"unsupported_by_vendor", value:"true");
script_set_attribute(attribute:"thorough_tests", value:"true");
script_end_attributes();
script_category(ACT_GATHER_INFO);
script_family(english:"Databases");
script_copyright(english:"This script is Copyright (C) 2012-2026 and is owned by Tenable, Inc. or an Affiliate thereof.");
script_dependencies("postgres_installed_windows.nbin", "postgres_installed_nix.nbin", "postgresql_version.nbin");
script_require_ports("installed_sw/PostgreSQL","Services/postgresql", 5432);
exit(0);
}
include("backport.inc");
include("smb_func.inc");
include('vcf_extras_postgresql.inc');
var app = 'PostgreSQL';
var win_local, nix_local = FALSE;
var kb_base, port, kb_ver, kb_path, ver;
# remote
port = get_service(svc:"postgresql", default:5432);
kb_base = 'database/' + port + '/postgresql/';
kb_ver = NULL;
kb_path = kb_base + 'version';
ver = get_kb_item(kb_path);
if (!empty_or_null(ver)) kb_ver = kb_path;
var app_info = vcf::postgresql::get_app_info(app:app, port:port, kb_ver:kb_ver, kb_base:kb_base, win_local:win_local);
vcf::check_granularity(app_info:app_info, sig_segments:2);
var version = app_info['version'];
var source = app_info['path'];
var database = app_info['database'];
var local_win_psql = 130127;
var local_nix_psql = 130024;
var local_plugin_check_exec = app_info['plugin_id'];
var paranoia_set_required = FALSE;
# Checks if local plugins executes; prioritizes local detection over remote
# Uses remote scan results, if local detections did not find anything
if ((!empty_or_null(local_plugin_check_exec) && local_plugin_check_exec == local_win_psql))
{
win_local = TRUE;
port = kb_smb_transport();
}
if ((!empty_or_null(local_plugin_check_exec) && local_plugin_check_exec == local_nix_psql))
{
nix_local = TRUE;
port = 0;
}
if (win_local == TRUE || nix_local == TRUE)
{
paranoia_set_required = FALSE;
}
else
{
paranoia_set_required = TRUE;
}
if (paranoia_set_required == TRUE)
{
if (report_paranoia < 2)
{
audit(AUDIT_POTENTIAL_VULN);
}
}
#
# current supported versions: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
#
ver = split(version, sep:'.');
for (var i=0; i < max_index(ver); i++)
ver[i] = int(ver[i]);
if ( ver[0] < 14 )
{
register_unsupported_product(product_name:"PostgreSQL",
cpe_base:"postgresql:postgresql", version:version);
var report = '';
report +=
'\n Version source : ' + source +
'\n Installed version : ' + version +
'\n Supported versions : 14 / 15 / 16 / 17 / 18\n';
if(database)
{
report += '\n Database name : ' + database;
}
security_report_v4(port:port, severity:SECURITY_HOLE, extra:report);
}
audit(AUDIT_SUPPORTED, app, version);Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation