Vulnerabilities > CVE-2012-0866 - Permissions, Privileges, and Access Controls vulnerability in Postgresql
Attack vector
UNKNOWN Attack complexity
UNKNOWN Privileges required
UNKNOWN Confidentiality impact
UNKNOWN Integrity impact
UNKNOWN Availability impact
UNKNOWN Summary
CREATE TRIGGER in PostgreSQL 8.3.x before 8.3.18, 8.4.x before 8.4.11, 9.0.x before 9.0.7, and 9.1.x before 9.1.3 does not properly check the execute permission for trigger functions marked SECURITY DEFINER, which allows remote authenticated users to execute otherwise restricted triggers on arbitrary data by installing the trigger on an attacker-owned table.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Accessing, Modifying or Executing Executable Files An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
- Leverage Executable Code in Non-Executable Files An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
- Blue Boxing This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
- Restful Privilege Elevation Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
- Target Programs with Elevated Privileges This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.
Nessus
NASL family SuSE Local Security Checks NASL id SUSE_11_POSTGRESQL-120322.NASL description - Security and bugfix release 8.3.18 : - Require execute permission on the trigger function for CREATE TRIGGER. (CVE-2012-0866, bnc#749299) - Convert newlines to spaces in names written in pg_dump comments (CVE-2012-0868, bnc#749303). Please see the PostgreSQL release notes document for full changelog and details : http://www.postgresql.org/docs/8.3/static/release.html last seen 2020-06-05 modified 2013-01-25 plugin id 64215 published 2013-01-25 reporter This script is Copyright (C) 2013-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/64215 title SuSE 11.1 Security Update : PostgreSQL (SAT Patch Number 6023) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from SuSE 11 update information. The text itself is # copyright (C) Novell, Inc. # if (NASL_LEVEL < 3000) exit(0); include("compat.inc"); if (description) { script_id(64215); script_version("1.3"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04"); script_cve_id("CVE-2012-0866", "CVE-2012-0868"); script_name(english:"SuSE 11.1 Security Update : PostgreSQL (SAT Patch Number 6023)"); script_summary(english:"Checks rpm output for the updated packages"); script_set_attribute( attribute:"synopsis", value:"The remote SuSE 11 host is missing one or more security updates." ); script_set_attribute( attribute:"description", value: " - Security and bugfix release 8.3.18 : - Require execute permission on the trigger function for CREATE TRIGGER. (CVE-2012-0866, bnc#749299) - Convert newlines to spaces in names written in pg_dump comments (CVE-2012-0868, bnc#749303). Please see the PostgreSQL release notes document for full changelog and details : http://www.postgresql.org/docs/8.3/static/release.html" ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.novell.com/show_bug.cgi?id=701489" ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.novell.com/show_bug.cgi?id=749299" ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.novell.com/show_bug.cgi?id=749303" ); script_set_attribute( attribute:"see_also", value:"http://support.novell.com/security/cve/CVE-2012-0866.html" ); script_set_attribute( attribute:"see_also", value:"http://support.novell.com/security/cve/CVE-2012-0868.html" ); script_set_attribute(attribute:"solution", value:"Apply SAT patch number 6023."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:postgresql"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:postgresql-contrib"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:postgresql-docs"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:postgresql-libs"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:postgresql-libs-32bit"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:11:postgresql-server"); script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:suse_linux:11"); script_set_attribute(attribute:"patch_publication_date", value:"2012/03/22"); script_set_attribute(attribute:"plugin_publication_date", value:"2013/01/25"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2013-2020 Tenable Network Security, Inc."); script_family(english:"SuSE Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/SuSE/release", "Host/SuSE/rpm-list"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("rpm.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); release = get_kb_item("Host/SuSE/release"); if (isnull(release) || release !~ "^(SLED|SLES)11") audit(AUDIT_OS_NOT, "SuSE 11"); if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING); cpu = get_kb_item("Host/cpu"); if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH); if (cpu !~ "^i[3-6]86$" && "x86_64" >!< cpu && "s390x" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "SuSE 11", cpu); pl = get_kb_item("Host/SuSE/patchlevel"); if (isnull(pl) || int(pl) != 1) audit(AUDIT_OS_NOT, "SuSE 11.1"); flag = 0; if (rpm_check(release:"SLED11", sp:1, cpu:"i586", reference:"postgresql-8.3.18-0.3.1")) flag++; if (rpm_check(release:"SLED11", sp:1, cpu:"i586", reference:"postgresql-libs-8.3.18-0.3.1")) flag++; if (rpm_check(release:"SLED11", sp:1, cpu:"x86_64", reference:"postgresql-8.3.18-0.3.1")) flag++; if (rpm_check(release:"SLED11", sp:1, cpu:"x86_64", reference:"postgresql-libs-8.3.18-0.3.1")) flag++; if (rpm_check(release:"SLED11", sp:1, cpu:"x86_64", reference:"postgresql-libs-32bit-8.3.18-0.3.1")) flag++; if (rpm_check(release:"SLES11", sp:1, reference:"postgresql-8.3.18-0.3.1")) flag++; if (rpm_check(release:"SLES11", sp:1, reference:"postgresql-contrib-8.3.18-0.3.1")) flag++; if (rpm_check(release:"SLES11", sp:1, reference:"postgresql-docs-8.3.18-0.3.1")) flag++; if (rpm_check(release:"SLES11", sp:1, reference:"postgresql-libs-8.3.18-0.3.1")) flag++; if (rpm_check(release:"SLES11", sp:1, reference:"postgresql-server-8.3.18-0.3.1")) flag++; if (rpm_check(release:"SLES11", sp:1, cpu:"s390x", reference:"postgresql-libs-32bit-8.3.18-0.3.1")) flag++; if (rpm_check(release:"SLES11", sp:1, cpu:"x86_64", reference:"postgresql-libs-32bit-8.3.18-0.3.1")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get()); else security_warning(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
NASL family Fedora Local Security Checks NASL id FEDORA_2012-2589.NASL description Update to latest Postgres releases --- resolves some security and data loss bugs http://www.postgresql.org/docs/9.1/static/release-9-1-3.html http://www.postgresql.org/docs/9.0/static/release-9-0-7.html Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-03-17 modified 2012-03-08 plugin id 58281 published 2012-03-08 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/58281 title Fedora 15 : postgresql-9.0.7-1.fc15 (2012-2589) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Fedora Security Advisory 2012-2589. # include("compat.inc"); if (description) { script_id(58281); script_version("1.15"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12"); script_cve_id("CVE-2012-0866", "CVE-2012-0867", "CVE-2012-0868"); script_bugtraq_id(52188); script_xref(name:"FEDORA", value:"2012-2589"); script_name(english:"Fedora 15 : postgresql-9.0.7-1.fc15 (2012-2589)"); script_summary(english:"Checks rpm output for the updated package."); script_set_attribute( attribute:"synopsis", value:"The remote Fedora host is missing a security update." ); script_set_attribute( attribute:"description", value: "Update to latest Postgres releases --- resolves some security and data loss bugs http://www.postgresql.org/docs/9.1/static/release-9-1-3.html http://www.postgresql.org/docs/9.0/static/release-9-0-7.html Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues." ); # http://www.postgresql.org/docs/9.0/static/release-9-0-7.html script_set_attribute( attribute:"see_also", value:"https://www.postgresql.org/docs/9.0/release-9-0-7.html" ); # http://www.postgresql.org/docs/9.1/static/release-9-1-3.html script_set_attribute( attribute:"see_also", value:"https://www.postgresql.org/docs/9.1/release-9-1-3.html" ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.redhat.com/show_bug.cgi?id=797222" ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.redhat.com/show_bug.cgi?id=797915" ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.redhat.com/show_bug.cgi?id=797917" ); # https://lists.fedoraproject.org/pipermail/package-announce/2012-March/074715.html script_set_attribute( attribute:"see_also", value:"http://www.nessus.org/u?10610e11" ); script_set_attribute( attribute:"solution", value:"Update the affected postgresql package." ); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:ND/RL:OF/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"exploit_available", value:"false"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:postgresql"); script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:15"); script_set_attribute(attribute:"patch_publication_date", value:"2012/02/28"); script_set_attribute(attribute:"plugin_publication_date", value:"2012/03/08"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"Fedora Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("rpm.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); release = get_kb_item("Host/RedHat/release"); if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora"); os_ver = eregmatch(pattern: "Fedora.*release ([0-9]+)", string:release); if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora"); os_ver = os_ver[1]; if (! ereg(pattern:"^15([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 15.x", "Fedora " + os_ver); if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING); cpu = get_kb_item("Host/cpu"); if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH); if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu); flag = 0; if (rpm_check(release:"FC15", reference:"postgresql-9.0.7-1.fc15")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get()); else security_warning(0); exit(0); } else { tested = pkg_tests_get(); if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested); else audit(AUDIT_PACKAGE_NOT_INSTALLED, "postgresql"); }
NASL family Mandriva Local Security Checks NASL id MANDRIVA_MDVSA-2012-092.NASL description Multiple vulnerabilities has been discovered and corrected in postgresql : Fix incorrect password transformation in contrib/pgcrypto last seen 2020-06-01 modified 2020-06-02 plugin id 59518 published 2012-06-15 reporter This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/59518 title Mandriva Linux Security Advisory : postgresql (MDVSA-2012:092) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Mandriva Linux Security Advisory MDVSA-2012:092. # The text itself is copyright (C) Mandriva S.A. # include("compat.inc"); if (description) { script_id(59518); script_version("1.14"); script_cvs_date("Date: 2019/08/02 13:32:54"); script_cve_id("CVE-2012-0866", "CVE-2012-2143", "CVE-2012-2655"); script_bugtraq_id(53729, 53812); script_xref(name:"MDVSA", value:"2012:092"); script_name(english:"Mandriva Linux Security Advisory : postgresql (MDVSA-2012:092)"); script_summary(english:"Checks rpm output for the updated packages"); script_set_attribute( attribute:"synopsis", value: "The remote Mandriva Linux host is missing one or more security updates." ); script_set_attribute( attribute:"description", value: "Multiple vulnerabilities has been discovered and corrected in postgresql : Fix incorrect password transformation in contrib/pgcrypto's DES crypt() function (Solar Designer). If a password string contained the byte value 0x80, the remainder of the password was ignored, causing the password to be much weaker than it appeared. With this fix, the rest of the string is properly included in the DES hash. Any stored password values that are affected by this bug will thus no longer match, so the stored values may need to be updated (CVE-2012-2143). Ignore SECURITY DEFINER and SET attributes for a procedural language's call handler (Tom Lane). Applying such attributes to a call handler could crash the server (CVE-2012-2655). This advisory provides the latest versions of PostgreSQL that is not vulnerable to these issues." ); script_set_attribute( attribute:"see_also", value:"https://www.postgresql.org/docs/8.3/release-8-3-19.html" ); script_set_attribute( attribute:"see_also", value:"https://www.postgresql.org/docs/8.4/release-8-4-12.html" ); script_set_attribute( attribute:"see_also", value:"https://www.postgresql.org/docs/9.0/release-9-0-8.html" ); script_set_attribute(attribute:"solution", value:"Update the affected packages."); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:ND"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"exploit_available", value:"false"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64ecpg8.4_6"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64ecpg9.0_6"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64pq8.4_5"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64pq9.0_5"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:libecpg8.4_6"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:libecpg9.0_6"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:libpq8.4_5"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:libpq9.0_5"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql8.4"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql8.4-contrib"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql8.4-devel"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql8.4-docs"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql8.4-pl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql8.4-plperl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql8.4-plpgsql"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql8.4-plpython"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql8.4-pltcl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql8.4-server"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql9.0"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql9.0-contrib"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql9.0-devel"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql9.0-docs"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql9.0-pl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql9.0-plperl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql9.0-plpgsql"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql9.0-plpython"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql9.0-pltcl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:postgresql9.0-server"); script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:linux:2010.1"); script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:linux:2011"); script_set_attribute(attribute:"patch_publication_date", value:"2012/06/15"); script_set_attribute(attribute:"plugin_publication_date", value:"2012/06/15"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"Mandriva Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/Mandrake/release", "Host/Mandrake/rpm-list"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("rpm.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); if (!get_kb_item("Host/Mandrake/release")) audit(AUDIT_OS_NOT, "Mandriva / Mandake Linux"); if (!get_kb_item("Host/Mandrake/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING); cpu = get_kb_item("Host/cpu"); if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH); if (cpu !~ "^(amd64|i[3-6]86|x86_64)$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Mandriva / Mandrake Linux", cpu); flag = 0; if (rpm_check(release:"MDK2010.1", cpu:"x86_64", reference:"lib64ecpg8.4_6-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", cpu:"x86_64", reference:"lib64pq8.4_5-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", cpu:"i386", reference:"libecpg8.4_6-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", cpu:"i386", reference:"libpq8.4_5-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", reference:"postgresql8.4-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", reference:"postgresql8.4-contrib-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", reference:"postgresql8.4-devel-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", reference:"postgresql8.4-docs-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", reference:"postgresql8.4-pl-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", reference:"postgresql8.4-plperl-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", reference:"postgresql8.4-plpgsql-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", reference:"postgresql8.4-plpython-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", reference:"postgresql8.4-pltcl-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2010.1", reference:"postgresql8.4-server-8.4.12-0.1mdv2010.2", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", cpu:"x86_64", reference:"lib64ecpg9.0_6-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", cpu:"x86_64", reference:"lib64pq9.0_5-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", cpu:"i386", reference:"libecpg9.0_6-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", cpu:"i386", reference:"libpq9.0_5-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", reference:"postgresql9.0-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", reference:"postgresql9.0-contrib-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", reference:"postgresql9.0-devel-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", reference:"postgresql9.0-docs-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", reference:"postgresql9.0-pl-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", reference:"postgresql9.0-plperl-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", reference:"postgresql9.0-plpgsql-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", reference:"postgresql9.0-plpython-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", reference:"postgresql9.0-pltcl-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (rpm_check(release:"MDK2011", reference:"postgresql9.0-server-9.0.8-0.1-mdv2011.0", yank:"mdv")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get()); else security_warning(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
NASL family Gentoo Local Security Checks NASL id GENTOO_GLSA-201209-24.NASL description The remote host is affected by the vulnerability described in GLSA-201209-24 (PostgreSQL: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in PostgreSQL. Please review the CVE identifiers referenced below for details. Impact : A remote attacker could spoof SSL connections. Furthermore, a remote authenticated attacker could cause a Denial of Service, read and write arbitrary files, inject SQL commands into dump scripts, or bypass database restrictions to execute database functions. A context-dependent attacker could more easily obtain access via authentication attempts with an initial substring of the intended password. Workaround : There is no known workaround at this time. last seen 2020-06-01 modified 2020-06-02 plugin id 62380 published 2012-09-29 reporter This script is Copyright (C) 2012-2018 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/62380 title GLSA-201209-24 : PostgreSQL: Multiple vulnerabilities code # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Gentoo Linux Security Advisory GLSA 201209-24. # # The advisory text is Copyright (C) 2001-2015 Gentoo Foundation, Inc. # and licensed under the Creative Commons - Attribution / Share Alike # license. See http://creativecommons.org/licenses/by-sa/3.0/ # include("compat.inc"); if (description) { script_id(62380); script_version("1.11"); script_cvs_date("Date: 2018/07/11 17:09:26"); script_cve_id("CVE-2012-0866", "CVE-2012-0867", "CVE-2012-0868", "CVE-2012-2143", "CVE-2012-2655", "CVE-2012-3488", "CVE-2012-3489"); script_bugtraq_id(52188, 53729, 53812, 55072, 55074); script_xref(name:"GLSA", value:"201209-24"); script_name(english:"GLSA-201209-24 : PostgreSQL: Multiple vulnerabilities"); script_summary(english:"Checks for updated package(s) in /var/db/pkg"); script_set_attribute( attribute:"synopsis", value: "The remote Gentoo host is missing one or more security-related patches." ); script_set_attribute( attribute:"description", value: "The remote host is affected by the vulnerability described in GLSA-201209-24 (PostgreSQL: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in PostgreSQL. Please review the CVE identifiers referenced below for details. Impact : A remote attacker could spoof SSL connections. Furthermore, a remote authenticated attacker could cause a Denial of Service, read and write arbitrary files, inject SQL commands into dump scripts, or bypass database restrictions to execute database functions. A context-dependent attacker could more easily obtain access via authentication attempts with an initial substring of the intended password. Workaround : There is no known workaround at this time." ); script_set_attribute( attribute:"see_also", value:"https://security.gentoo.org/glsa/201209-24" ); script_set_attribute( attribute:"solution", value: "All PostgreSQL 9.1 server users should upgrade to the latest version: # emerge --sync # emerge --ask --oneshot --verbose '>=dev-db/postgresql-server-9.1.5' All PostgreSQL 9.0 server users should upgrade to the latest version: # emerge --sync # emerge --ask --oneshot --verbose '>=dev-db/postgresql-server-9.0.9' All PostgreSQL 8.4 server users should upgrade to the latest version: # emerge --sync # emerge --ask --oneshot --verbose '>=dev-db/postgresql-server-8.4.13' All PostgreSQL 8.3 server users should upgrade to the latest version: # emerge --sync # emerge --ask --oneshot --verbose '>=dev-db/postgresql-server-8.3.20'" ); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"exploit_available", value:"false"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:postgresql-server"); script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux"); script_set_attribute(attribute:"patch_publication_date", value:"2012/09/28"); script_set_attribute(attribute:"plugin_publication_date", value:"2012/09/29"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2012-2018 Tenable Network Security, Inc."); script_family(english:"Gentoo Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/Gentoo/release", "Host/Gentoo/qpkg-list"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("qpkg.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); if (!get_kb_item("Host/Gentoo/release")) audit(AUDIT_OS_NOT, "Gentoo"); if (!get_kb_item("Host/Gentoo/qpkg-list")) audit(AUDIT_PACKAGE_LIST_MISSING); flag = 0; if (qpkg_check(package:"dev-db/postgresql-server", unaffected:make_list("ge 9.1.5", "rge 9.0.9", "rge 8.4.13", "rge 8.3.20", "rge 8.4.17", "rge 8.4.19", "rge 9.0.13", "rge 9.0.14", "rge 9.0.15", "rge 8.4.14", "rge 8.4.15", "rge 8.4.16", "rge 9.0.16", "rge 9.0.17"), vulnerable:make_list("lt 9.1.5"))) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:qpkg_report_get()); else security_warning(0); exit(0); } else { tested = qpkg_tests_get(); if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested); else audit(AUDIT_PACKAGE_NOT_INSTALLED, "PostgreSQL"); }
NASL family Red Hat Local Security Checks NASL id REDHAT-RHSA-2012-0677.NASL description Updated postgresql packages that fix two security issues are now available for Red Hat Enterprise Linux 5. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. PostgreSQL is an advanced object-relational database management system (DBMS). The pg_dump utility inserted object names literally into comments in the SQL script it produces. An unprivileged database user could create an object whose name includes a newline followed by a SQL command. This SQL command might then be executed by a privileged user during later restore of the backup dump, allowing privilege escalation. (CVE-2012-0868) CREATE TRIGGER did not do a permissions check on the trigger function to be called. This could possibly allow an authenticated database user to call a privileged trigger function on data of their choosing. (CVE-2012-0866) All PostgreSQL users are advised to upgrade to these updated packages, which contain backported patches to correct these issues. If the postgresql service is running, it will be automatically restarted after installing this update. last seen 2020-06-01 modified 2020-06-02 plugin id 59222 published 2012-05-22 reporter This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/59222 title RHEL 5 : postgresql (RHSA-2012:0677) code # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Red Hat Security Advisory RHSA-2012:0677. The text # itself is copyright (C) Red Hat, Inc. # include("compat.inc"); if (description) { script_id(59222); script_version ("1.21"); script_cvs_date("Date: 2019/10/24 15:35:35"); script_cve_id("CVE-2012-0866", "CVE-2012-0868"); script_bugtraq_id(52188); script_xref(name:"RHSA", value:"2012:0677"); script_name(english:"RHEL 5 : postgresql (RHSA-2012:0677)"); script_summary(english:"Checks the rpm output for the updated packages"); script_set_attribute( attribute:"synopsis", value:"The remote Red Hat host is missing one or more security updates." ); script_set_attribute( attribute:"description", value: "Updated postgresql packages that fix two security issues are now available for Red Hat Enterprise Linux 5. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. PostgreSQL is an advanced object-relational database management system (DBMS). The pg_dump utility inserted object names literally into comments in the SQL script it produces. An unprivileged database user could create an object whose name includes a newline followed by a SQL command. This SQL command might then be executed by a privileged user during later restore of the backup dump, allowing privilege escalation. (CVE-2012-0868) CREATE TRIGGER did not do a permissions check on the trigger function to be called. This could possibly allow an authenticated database user to call a privileged trigger function on data of their choosing. (CVE-2012-0866) All PostgreSQL users are advised to upgrade to these updated packages, which contain backported patches to correct these issues. If the postgresql service is running, it will be automatically restarted after installing this update." ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/errata/RHSA-2012:0677" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/security/cve/cve-2012-0866" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/security/cve/cve-2012-0868" ); script_set_attribute(attribute:"solution", value:"Update the affected packages."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"exploit_available", value:"false"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-contrib"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-debuginfo"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-devel"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-docs"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-libs"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-pl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-python"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-server"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-tcl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-test"); script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:5"); script_set_attribute(attribute:"patch_publication_date", value:"2012/05/21"); script_set_attribute(attribute:"plugin_publication_date", value:"2012/05/22"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"Red Hat Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list", "Host/cpu"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("misc_func.inc"); include("rpm.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); release = get_kb_item("Host/RedHat/release"); if (isnull(release) || "Red Hat" >!< release) audit(AUDIT_OS_NOT, "Red Hat"); os_ver = eregmatch(pattern: "Red Hat Enterprise Linux.*release ([0-9]+(\.[0-9]+)?)", string:release); if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Red Hat"); os_ver = os_ver[1]; if (! ereg(pattern:"^5([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 5.x", "Red Hat " + os_ver); if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING); cpu = get_kb_item("Host/cpu"); if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH); if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$" && "s390" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Red Hat", cpu); yum_updateinfo = get_kb_item("Host/RedHat/yum-updateinfo"); if (!empty_or_null(yum_updateinfo)) { rhsa = "RHSA-2012:0677"; yum_report = redhat_generate_yum_updateinfo_report(rhsa:rhsa); if (!empty_or_null(yum_report)) { security_report_v4( port : 0, severity : SECURITY_WARNING, extra : yum_report ); exit(0); } else { audit_message = "affected by Red Hat security advisory " + rhsa; audit(AUDIT_OS_NOT, audit_message); } } else { flag = 0; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql-contrib-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql-contrib-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql-contrib-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", reference:"postgresql-debuginfo-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", reference:"postgresql-devel-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql-docs-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql-docs-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql-docs-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", reference:"postgresql-libs-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql-pl-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql-pl-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql-pl-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql-python-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql-python-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql-python-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql-server-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql-server-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql-server-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql-tcl-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql-tcl-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql-tcl-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql-test-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql-test-8.1.23-4.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql-test-8.1.23-4.el5_8")) flag++; if (flag) { security_report_v4( port : 0, severity : SECURITY_WARNING, extra : rpm_report_get() + redhat_report_package_caveat() ); exit(0); } else { tested = pkg_tests_get(); if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested); else audit(AUDIT_PACKAGE_NOT_INSTALLED, "postgresql / postgresql-contrib / postgresql-debuginfo / etc"); } }
NASL family SuSE Local Security Checks NASL id SUSE_POSTGRESQL-8071.NASL description - Security and bugfix release : - Require execute permission on the trigger function for CREATE TRIGGER. (CVE-2012-0866, bnc#749299) - Convert newlines to spaces in names written in pg_dump comments. (CVE-2012-0868, bnc#749303) Please see the PostgreSQL release notes document for full changelog and details : http://www.postgresql.org/docs/8.3/static/release.html last seen 2020-06-05 modified 2012-06-06 plugin id 59384 published 2012-06-06 reporter This script is Copyright (C) 2012-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/59384 title SuSE 10 Security Update : PostgreSQL (ZYPP Patch Number 8071) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The text description of this plugin is (C) Novell, Inc. # include("compat.inc"); if (description) { script_id(59384); script_version("1.7"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04"); script_cve_id("CVE-2012-0866", "CVE-2012-0868"); script_name(english:"SuSE 10 Security Update : PostgreSQL (ZYPP Patch Number 8071)"); script_summary(english:"Checks rpm output for the updated packages"); script_set_attribute( attribute:"synopsis", value:"The remote SuSE 10 host is missing a security-related patch." ); script_set_attribute( attribute:"description", value: " - Security and bugfix release : - Require execute permission on the trigger function for CREATE TRIGGER. (CVE-2012-0866, bnc#749299) - Convert newlines to spaces in names written in pg_dump comments. (CVE-2012-0868, bnc#749303) Please see the PostgreSQL release notes document for full changelog and details : http://www.postgresql.org/docs/8.3/static/release.html" ); script_set_attribute( attribute:"see_also", value:"http://support.novell.com/security/cve/CVE-2012-0866.html" ); script_set_attribute( attribute:"see_also", value:"http://support.novell.com/security/cve/CVE-2012-0868.html" ); script_set_attribute(attribute:"solution", value:"Apply ZYPP patch number 8071."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"cpe:/o:suse:suse_linux"); script_set_attribute(attribute:"patch_publication_date", value:"2012/04/13"); script_set_attribute(attribute:"plugin_publication_date", value:"2012/06/06"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2012-2020 Tenable Network Security, Inc."); script_family(english:"SuSE Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/SuSE/release", "Host/SuSE/rpm-list"); exit(0); } include("global_settings.inc"); include("rpm.inc"); if (!get_kb_item("Host/local_checks_enabled")) exit(0, "Local checks are not enabled."); if (!get_kb_item("Host/SuSE/release")) exit(0, "The host is not running SuSE."); if (!get_kb_item("Host/SuSE/rpm-list")) exit(1, "Could not obtain the list of installed packages."); cpu = get_kb_item("Host/cpu"); if (isnull(cpu)) exit(1, "Failed to determine the architecture type."); if (cpu >!< "x86_64" && cpu !~ "^i[3-6]86$") exit(1, "Local checks for SuSE 10 on the '"+cpu+"' architecture have not been implemented."); flag = 0; if (rpm_check(release:"SLED10", sp:4, reference:"postgresql-devel-8.1.22-0.8.1")) flag++; if (rpm_check(release:"SLED10", sp:4, reference:"postgresql-libs-8.1.22-0.8.1")) flag++; if (rpm_check(release:"SLED10", sp:4, cpu:"x86_64", reference:"postgresql-libs-32bit-8.1.22-0.8.1")) flag++; if (rpm_check(release:"SLES10", sp:4, reference:"postgresql-8.1.22-0.8.1")) flag++; if (rpm_check(release:"SLES10", sp:4, reference:"postgresql-contrib-8.1.22-0.8.1")) flag++; if (rpm_check(release:"SLES10", sp:4, reference:"postgresql-devel-8.1.22-0.8.1")) flag++; if (rpm_check(release:"SLES10", sp:4, reference:"postgresql-docs-8.1.22-0.8.1")) flag++; if (rpm_check(release:"SLES10", sp:4, reference:"postgresql-libs-8.1.22-0.8.1")) flag++; if (rpm_check(release:"SLES10", sp:4, reference:"postgresql-server-8.1.22-0.8.1")) flag++; if (rpm_check(release:"SLES10", sp:4, cpu:"x86_64", reference:"postgresql-libs-32bit-8.1.22-0.8.1")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get()); else security_warning(0); exit(0); } else exit(0, "The host is not affected.");
NASL family Red Hat Local Security Checks NASL id REDHAT-RHSA-2012-0678.NASL description Updated postgresql84 and postgresql packages that fix three security issues are now available for Red Hat Enterprise Linux 5 and 6 respectively. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. PostgreSQL is an advanced object-relational database management system (DBMS). The pg_dump utility inserted object names literally into comments in the SQL script it produces. An unprivileged database user could create an object whose name includes a newline followed by a SQL command. This SQL command might then be executed by a privileged user during later restore of the backup dump, allowing privilege escalation. (CVE-2012-0868) When configured to do SSL certificate verification, PostgreSQL only checked the first 31 characters of the certificate last seen 2020-06-01 modified 2020-06-02 plugin id 59223 published 2012-05-22 reporter This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/59223 title RHEL 5 / 6 : postgresql and postgresql84 (RHSA-2012:0678) code # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Red Hat Security Advisory RHSA-2012:0678. The text # itself is copyright (C) Red Hat, Inc. # include("compat.inc"); if (description) { script_id(59223); script_version ("1.23"); script_cvs_date("Date: 2019/10/24 15:35:35"); script_cve_id("CVE-2012-0866", "CVE-2012-0867", "CVE-2012-0868"); script_bugtraq_id(52188); script_xref(name:"RHSA", value:"2012:0678"); script_name(english:"RHEL 5 / 6 : postgresql and postgresql84 (RHSA-2012:0678)"); script_summary(english:"Checks the rpm output for the updated packages"); script_set_attribute( attribute:"synopsis", value:"The remote Red Hat host is missing one or more security updates." ); script_set_attribute( attribute:"description", value: "Updated postgresql84 and postgresql packages that fix three security issues are now available for Red Hat Enterprise Linux 5 and 6 respectively. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. PostgreSQL is an advanced object-relational database management system (DBMS). The pg_dump utility inserted object names literally into comments in the SQL script it produces. An unprivileged database user could create an object whose name includes a newline followed by a SQL command. This SQL command might then be executed by a privileged user during later restore of the backup dump, allowing privilege escalation. (CVE-2012-0868) When configured to do SSL certificate verification, PostgreSQL only checked the first 31 characters of the certificate's Common Name field. Depending on the configuration, this could allow an attacker to impersonate a server or a client using a certificate from a trusted Certificate Authority issued for a different name. (CVE-2012-0867) CREATE TRIGGER did not do a permissions check on the trigger function to be called. This could possibly allow an authenticated database user to call a privileged trigger function on data of their choosing. (CVE-2012-0866) These updated packages upgrade PostgreSQL to version 8.4.11, which fixes these issues as well as several data-corruption issues and lesser non-security issues. Refer to the PostgreSQL Release Notes for a full list of changes : http://www.postgresql.org/docs/8.4/static/release.html All PostgreSQL users are advised to upgrade to these updated packages, which correct these issues. If the postgresql service is running, it will be automatically restarted after installing this update." ); # http://www.postgresql.org/docs/8.4/static/release.html script_set_attribute( attribute:"see_also", value:"https://www.postgresql.org/docs/8.4/release.html" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/errata/RHSA-2012:0678" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/security/cve/cve-2012-0866" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/security/cve/cve-2012-0868" ); script_set_attribute( attribute:"see_also", value:"https://access.redhat.com/security/cve/cve-2012-0867" ); script_set_attribute(attribute:"solution", value:"Update the affected packages."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"exploit_available", value:"false"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-contrib"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-debuginfo"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-devel"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-docs"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-libs"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-plperl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-plpython"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-pltcl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-server"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql-test"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84-contrib"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84-debuginfo"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84-devel"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84-docs"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84-libs"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84-plperl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84-plpython"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84-pltcl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84-python"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84-server"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84-tcl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:postgresql84-test"); script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:5"); script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:6"); script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:6.2"); script_set_attribute(attribute:"vuln_publication_date", value:"2012/07/18"); script_set_attribute(attribute:"patch_publication_date", value:"2012/05/21"); script_set_attribute(attribute:"plugin_publication_date", value:"2012/05/22"); script_set_attribute(attribute:"generated_plugin", value:"current"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"Red Hat Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list", "Host/cpu"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("misc_func.inc"); include("rpm.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); release = get_kb_item("Host/RedHat/release"); if (isnull(release) || "Red Hat" >!< release) audit(AUDIT_OS_NOT, "Red Hat"); os_ver = pregmatch(pattern: "Red Hat Enterprise Linux.*release ([0-9]+(\.[0-9]+)?)", string:release); if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Red Hat"); os_ver = os_ver[1]; if (! preg(pattern:"^(5|6)([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 5.x / 6.x", "Red Hat " + os_ver); if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING); cpu = get_kb_item("Host/cpu"); if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH); if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$" && "s390" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Red Hat", cpu); yum_updateinfo = get_kb_item("Host/RedHat/yum-updateinfo"); if (!empty_or_null(yum_updateinfo)) { rhsa = "RHSA-2012:0678"; yum_report = redhat_generate_yum_updateinfo_report(rhsa:rhsa); if (!empty_or_null(yum_report)) { security_report_v4( port : 0, severity : SECURITY_WARNING, extra : yum_report ); exit(0); } else { audit_message = "affected by Red Hat security advisory " + rhsa; audit(AUDIT_OS_NOT, audit_message); } } else { flag = 0; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql84-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql84-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql84-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql84-contrib-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql84-contrib-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql84-contrib-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", reference:"postgresql84-debuginfo-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", reference:"postgresql84-devel-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql84-docs-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql84-docs-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql84-docs-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", reference:"postgresql84-libs-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql84-plperl-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql84-plperl-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql84-plperl-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql84-plpython-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql84-plpython-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql84-plpython-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql84-pltcl-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql84-pltcl-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql84-pltcl-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql84-python-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql84-python-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql84-python-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql84-server-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql84-server-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql84-server-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql84-tcl-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql84-tcl-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql84-tcl-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"i386", reference:"postgresql84-test-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"postgresql84-test-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"postgresql84-test-8.4.11-1.el5_8")) flag++; if (rpm_check(release:"RHEL6", reference:"postgresql-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"i686", reference:"postgresql-contrib-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"postgresql-contrib-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"postgresql-contrib-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", reference:"postgresql-debuginfo-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", reference:"postgresql-devel-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"i686", reference:"postgresql-docs-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"postgresql-docs-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"postgresql-docs-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", reference:"postgresql-libs-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"i686", reference:"postgresql-plperl-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"postgresql-plperl-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"postgresql-plperl-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"i686", reference:"postgresql-plpython-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"postgresql-plpython-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"postgresql-plpython-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"i686", reference:"postgresql-pltcl-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"postgresql-pltcl-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"postgresql-pltcl-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"i686", reference:"postgresql-server-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"postgresql-server-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"postgresql-server-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"i686", reference:"postgresql-test-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"postgresql-test-8.4.11-1.el6_2")) flag++; if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"postgresql-test-8.4.11-1.el6_2")) flag++; if (flag) { security_report_v4( port : 0, severity : SECURITY_WARNING, extra : rpm_report_get() + redhat_report_package_caveat() ); exit(0); } else { tested = pkg_tests_get(); if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested); else audit(AUDIT_PACKAGE_NOT_INSTALLED, "postgresql / postgresql-contrib / postgresql-debuginfo / etc"); } }
NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_174B8864623711E1BE1814DAE938EC40.NASL description The PostgreSQL Global Development Group reports : These vulnerabilities could allow users to define triggers that execute functions on which the user does not have EXECUTE permission, allow SSL certificate spoofing and allow line breaks in object names to be exploited to execute code when loading a pg_dump file. last seen 2020-06-01 modified 2020-06-02 plugin id 58162 published 2012-02-29 reporter This script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/58162 title FreeBSD : databases/postgresql*-client -- multiple vulnerabilities (174b8864-6237-11e1-be18-14dae938ec40) code # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from the FreeBSD VuXML database : # # Copyright 2003-2018 Jacques Vidrine and contributors # # Redistribution and use in source (VuXML) and 'compiled' forms (SGML, # HTML, PDF, PostScript, RTF and so forth) with or without modification, # are permitted provided that the following conditions are met: # 1. Redistributions of source code (VuXML) must retain the above # copyright notice, this list of conditions and the following # disclaimer as the first lines of this file unmodified. # 2. Redistributions in compiled form (transformed to other DTDs, # published online in any format, converted to PDF, PostScript, # RTF and other formats) must reproduce the above copyright # notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # # THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # include("compat.inc"); if (description) { script_id(58162); script_version("1.9"); script_cvs_date("Date: 2018/11/21 10:46:30"); script_cve_id("CVE-2012-0866", "CVE-2012-0867", "CVE-2012-0868"); script_name(english:"FreeBSD : databases/postgresql*-client -- multiple vulnerabilities (174b8864-6237-11e1-be18-14dae938ec40)"); script_summary(english:"Checks for updated packages in pkg_info output"); script_set_attribute( attribute:"synopsis", value: "The remote FreeBSD host is missing one or more security-related updates." ); script_set_attribute( attribute:"description", value: "The PostgreSQL Global Development Group reports : These vulnerabilities could allow users to define triggers that execute functions on which the user does not have EXECUTE permission, allow SSL certificate spoofing and allow line breaks in object names to be exploited to execute code when loading a pg_dump file." ); # http://www.postgresql.org/about/news/1377/ script_set_attribute( attribute:"see_also", value:"https://www.postgresql.org/about/news/1377/" ); # https://vuxml.freebsd.org/freebsd/174b8864-6237-11e1-be18-14dae938ec40.html script_set_attribute( attribute:"see_also", value:"http://www.nessus.org/u?67570833" ); script_set_attribute(attribute:"solution", value:"Update the affected packages."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:postgresql-client"); script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd"); script_set_attribute(attribute:"vuln_publication_date", value:"2012/02/27"); script_set_attribute(attribute:"patch_publication_date", value:"2012/02/28"); script_set_attribute(attribute:"plugin_publication_date", value:"2012/02/29"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"FreeBSD Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/FreeBSD/release", "Host/FreeBSD/pkg_info"); exit(0); } include("audit.inc"); include("freebsd_package.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); if (!get_kb_item("Host/FreeBSD/release")) audit(AUDIT_OS_NOT, "FreeBSD"); if (!get_kb_item("Host/FreeBSD/pkg_info")) audit(AUDIT_PACKAGE_LIST_MISSING); flag = 0; if (pkg_test(save_report:TRUE, pkg:"postgresql-client<8.3.18")) flag++; if (pkg_test(save_report:TRUE, pkg:"postgresql-client>=8.4<8.4.11")) flag++; if (pkg_test(save_report:TRUE, pkg:"postgresql-client>=9<9.0.7")) flag++; if (pkg_test(save_report:TRUE, pkg:"postgresql-client>=9.1<9.1.3")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:pkg_report_get()); else security_warning(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
NASL family SuSE Local Security Checks NASL id OPENSUSE-2012-603.NASL description Postgresql was updated to the security and bugfix release 9.1.3 : - Require execute permission on the trigger function for last seen 2020-06-05 modified 2014-06-13 plugin id 74756 published 2014-06-13 reporter This script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/74756 title openSUSE Security Update : postgresql (openSUSE-SU-2012:1173-1) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from openSUSE Security Update openSUSE-2012-603. # # The text description of this plugin is (C) SUSE LLC. # include("compat.inc"); if (description) { script_id(74756); script_version("1.4"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04"); script_cve_id("CVE-2012-0866", "CVE-2012-0867", "CVE-2012-0868"); script_name(english:"openSUSE Security Update : postgresql (openSUSE-SU-2012:1173-1)"); script_summary(english:"Check for the openSUSE-2012-603 patch"); script_set_attribute( attribute:"synopsis", value:"The remote openSUSE host is missing a security update." ); script_set_attribute( attribute:"description", value: "Postgresql was updated to the security and bugfix release 9.1.3 : - Require execute permission on the trigger function for 'CREATE TRIGGER' (CVE-2012-0866, bnc#749299). - Remove arbitrary limitation on length of common name in SSL certificates (CVE-2012-0867, bnc#749301). - Convert newlines to spaces in names written in pg_dump comments (CVE-2012-0868, bnc#749303). - See the release notes for the rest of the changes: http://www.postgresql.org/docs/9.1/static/release.html /usr/share/doc/packages/postgresql/HISTORY - This also fixes bnc#701489." ); # http://www.postgresql.org/docs/9.1/static/release.html script_set_attribute( attribute:"see_also", value:"https://www.postgresql.org/docs/9.1/release.html" ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.novell.com/show_bug.cgi?id=701489" ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.novell.com/show_bug.cgi?id=749299" ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.novell.com/show_bug.cgi?id=749301" ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.novell.com/show_bug.cgi?id=749303" ); script_set_attribute( attribute:"see_also", value:"https://lists.opensuse.org/opensuse-updates/2012-09/msg00060.html" ); script_set_attribute( attribute:"solution", value:"Update the affected postgresql packages." ); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libecpg6"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libecpg6-debuginfo"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libpq5"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libpq5-32bit"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libpq5-debuginfo"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libpq5-debuginfo-32bit"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-contrib"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-contrib-debuginfo"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-debuginfo"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-debugsource"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-devel"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-devel-32bit"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-devel-debuginfo"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-devel-debuginfo-32bit"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-libs-debugsource"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-plperl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-plperl-debuginfo"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-plpython"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-plpython-debuginfo"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-pltcl"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-pltcl-debuginfo"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-server"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:postgresql-server-debuginfo"); script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:12.2"); script_set_attribute(attribute:"patch_publication_date", value:"2012/09/07"); script_set_attribute(attribute:"plugin_publication_date", value:"2014/06/13"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"SuSE Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/SuSE/release", "Host/SuSE/rpm-list", "Host/cpu"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("rpm.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); release = get_kb_item("Host/SuSE/release"); if (isnull(release) || release =~ "^(SLED|SLES)") audit(AUDIT_OS_NOT, "openSUSE"); if (release !~ "^(SUSE12\.2)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "12.2", release); if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING); ourarch = get_kb_item("Host/cpu"); if (!ourarch) audit(AUDIT_UNKNOWN_ARCH); if (ourarch !~ "^(i586|i686|x86_64)$") audit(AUDIT_ARCH_NOT, "i586 / i686 / x86_64", ourarch); flag = 0; if ( rpm_check(release:"SUSE12.2", reference:"libecpg6-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"libecpg6-debuginfo-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"libpq5-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"libpq5-debuginfo-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-contrib-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-contrib-debuginfo-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-debuginfo-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-debugsource-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-devel-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-devel-debuginfo-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-libs-debugsource-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-plperl-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-plperl-debuginfo-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-plpython-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-plpython-debuginfo-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-pltcl-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-pltcl-debuginfo-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-server-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", reference:"postgresql-server-debuginfo-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", cpu:"x86_64", reference:"libpq5-32bit-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", cpu:"x86_64", reference:"libpq5-debuginfo-32bit-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", cpu:"x86_64", reference:"postgresql-devel-32bit-9.1.3-7.4.1") ) flag++; if ( rpm_check(release:"SUSE12.2", cpu:"x86_64", reference:"postgresql-devel-debuginfo-32bit-9.1.3-7.4.1") ) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get()); else security_warning(0); exit(0); } else { tested = pkg_tests_get(); if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested); else audit(AUDIT_PACKAGE_NOT_INSTALLED, "postgresql"); }
NASL family Mandriva Local Security Checks NASL id MANDRIVA_MDVSA-2012-026.NASL description Multiple vulnerabilities has been discovered and corrected in postgresql : Permissions on a function called by a trigger are not properly checked (CVE-2012-0866). SSL certificate name checks are truncated to 32 characters, allowing connection spoofing under some circumstances when using third-party certificate authorities (CVE-2012-0867). Line breaks in object names can be exploited to execute arbitrary SQL when reloading a pg_dump file (CVE-2012-0868). This advisory provides the latest versions of PostgreSQL that is not vulnerable to these issues. last seen 2020-06-01 modified 2020-06-02 plugin id 58177 published 2012-03-01 reporter This script is Copyright (C) 2012-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/58177 title Mandriva Linux Security Advisory : postgresql (MDVSA-2012:026) NASL family Oracle Linux Local Security Checks NASL id ORACLELINUX_ELSA-2012-0677.NASL description From Red Hat Security Advisory 2012:0677 : Updated postgresql packages that fix two security issues are now available for Red Hat Enterprise Linux 5. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. PostgreSQL is an advanced object-relational database management system (DBMS). The pg_dump utility inserted object names literally into comments in the SQL script it produces. An unprivileged database user could create an object whose name includes a newline followed by a SQL command. This SQL command might then be executed by a privileged user during later restore of the backup dump, allowing privilege escalation. (CVE-2012-0868) CREATE TRIGGER did not do a permissions check on the trigger function to be called. This could possibly allow an authenticated database user to call a privileged trigger function on data of their choosing. (CVE-2012-0866) All PostgreSQL users are advised to upgrade to these updated packages, which contain backported patches to correct these issues. If the postgresql service is running, it will be automatically restarted after installing this update. last seen 2020-06-01 modified 2020-06-02 plugin id 68528 published 2013-07-12 reporter This script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/68528 title Oracle Linux 5 : postgresql (ELSA-2012-0677) NASL family Ubuntu Local Security Checks NASL id UBUNTU_USN-1378-1.NASL description It was discovered that PostgreSQL incorrectly checked permissions on functions called by a trigger. An attacker could attach a trigger to a table they owned and possibly escalate privileges. (CVE-2012-0866) It was discovered that PostgreSQL incorrectly truncated SSL certificate name checks to 32 characters. If a host name was exactly 32 characters, this issue could be exploited by an attacker to spoof the SSL certificate. This issue affected Ubuntu 10.04 LTS, Ubuntu 10.10, Ubuntu 11.04 and Ubuntu 11.10. (CVE-2012-0867) It was discovered that the PostgreSQL pg_dump utility incorrectly filtered line breaks in object names. An attacker could create object names that execute arbitrary SQL commands when a dump script is reloaded. (CVE-2012-0868). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-01 modified 2020-06-02 plugin id 58168 published 2012-02-29 reporter Ubuntu Security Notice (C) 2012-2019 Canonical, Inc. / NASL script (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/58168 title Ubuntu 8.04 LTS / 10.04 LTS / 10.10 / 11.04 / 11.10 : postgresql-8.3, postgresql-8.4, postgresql-9.1 vulnerabilities (USN-1378-1) NASL family Oracle Linux Local Security Checks NASL id ORACLELINUX_ELSA-2012-0678.NASL description From Red Hat Security Advisory 2012:0678 : Updated postgresql84 and postgresql packages that fix three security issues are now available for Red Hat Enterprise Linux 5 and 6 respectively. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. PostgreSQL is an advanced object-relational database management system (DBMS). The pg_dump utility inserted object names literally into comments in the SQL script it produces. An unprivileged database user could create an object whose name includes a newline followed by a SQL command. This SQL command might then be executed by a privileged user during later restore of the backup dump, allowing privilege escalation. (CVE-2012-0868) When configured to do SSL certificate verification, PostgreSQL only checked the first 31 characters of the certificate last seen 2020-06-01 modified 2020-06-02 plugin id 68529 published 2013-07-12 reporter This script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/68529 title Oracle Linux 5 / 6 : postgresql / postgresql84 (ELSA-2012-0678) NASL family Debian Local Security Checks NASL id DEBIAN_DSA-2418.NASL description Several local vulnerabilities have been discovered in PostgreSQL, an object-relational SQL database. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2012-0866 It was discovered that the permissions of a function called by a trigger are not checked. This could result in privilege escalation. - CVE-2012-0867 It was discovered that only the first 32 characters of a host name are checked when validating host names through SSL certificates. This could result in spoofing the connection in limited circumstances. - CVE-2012-0868 It was discovered that pg_dump did not sanitise object names. This could result in arbitrary SQL command execution if a malformed dump file is opened. last seen 2020-03-17 modified 2012-02-28 plugin id 58135 published 2012-02-28 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/58135 title Debian DSA-2418-1 : postgresql-8.4 - several vulnerabilities NASL family CentOS Local Security Checks NASL id CENTOS_RHSA-2012-0677.NASL description Updated postgresql packages that fix two security issues are now available for Red Hat Enterprise Linux 5. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. PostgreSQL is an advanced object-relational database management system (DBMS). The pg_dump utility inserted object names literally into comments in the SQL script it produces. An unprivileged database user could create an object whose name includes a newline followed by a SQL command. This SQL command might then be executed by a privileged user during later restore of the backup dump, allowing privilege escalation. (CVE-2012-0868) CREATE TRIGGER did not do a permissions check on the trigger function to be called. This could possibly allow an authenticated database user to call a privileged trigger function on data of their choosing. (CVE-2012-0866) All PostgreSQL users are advised to upgrade to these updated packages, which contain backported patches to correct these issues. If the postgresql service is running, it will be automatically restarted after installing this update. last seen 2020-06-01 modified 2020-06-02 plugin id 59213 published 2012-05-22 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/59213 title CentOS 5 : postgresql (CESA-2012:0677) NASL family Fedora Local Security Checks NASL id FEDORA_2012-2591.NASL description Update to latest Postgres releases --- resolves some security and data loss bugs http://www.postgresql.org/docs/9.1/static/release-9-1-3.html http://www.postgresql.org/docs/9.0/static/release-9-0-7.html Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-03-17 modified 2012-03-08 plugin id 58282 published 2012-03-08 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/58282 title Fedora 16 : postgresql-9.1.3-1.fc16 (2012-2591) NASL family Databases NASL id POSTGRESQL_20120227.NASL description The version of PostgreSQL installed on the remote host is 8.4.x prior to 8.4.11, 9.0.x prior to 9.0.7, or 9.1.x prior to 9.1.3. It is, therefore, potentially affected by multiple vulnerabilities : - Permissions on a function called by a trigger are not properly checked. (CVE-2012-0866) - SSL certificate name checks are truncated to 32 characters, allowing connection spoofing under some circumstances when using third-party certificate authorities. (CVE-2012-0867) - Line breaks in object names can be exploited to execute arbitrary SQL commands when reloading a pg_dump file. (CVE-2012-0868) last seen 2020-06-01 modified 2020-06-02 plugin id 63352 published 2012-12-28 reporter This script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/63352 title PostgreSQL 8.4 < 8.4.11 / 9.0 < 9.0.7 / 9.1 < 9.1.3 Multiple Vulnerabilities NASL family SuSE Local Security Checks NASL id OPENSUSE-2012-214.NASL description - Security and bugfix release 9.1.3 : - Require execute permission on the trigger function for last seen 2020-06-05 modified 2014-06-13 plugin id 74591 published 2014-06-13 reporter This script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/74591 title openSUSE Security Update : postgresql (openSUSE-SU-2012:0480-1) NASL family Databases NASL id POSTGRESQL_8318.NASL description The version of PostgreSQL installed on the remote host is 8.3.x prior to 8.3.18, and is, therefore, potentially affected by multiple vulnerabilities : - Permissions on a function called by a trigger are not properly checked. (CVE-2012-0866) - Line breaks in object names can be exploited to execute arbitrary SQL commands when reloading a pg_dump file. (CVE-2012-0868) last seen 2020-06-01 modified 2020-06-02 plugin id 63355 published 2012-12-28 reporter This script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/63355 title PostgreSQL 8.3 < 8.3.18 Multiple Vulnerabilities NASL family Fedora Local Security Checks NASL id FEDORA_2012-2508.NASL description Update to latest Postgres releases --- resolves some security and data loss bugs http://www.postgresql.org/docs/9.1/static/release-9-1-3.html http://www.postgresql.org/docs/9.0/static/release-9-0-7.html Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-03-17 modified 2012-03-07 plugin id 58257 published 2012-03-07 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/58257 title Fedora 17 : postgresql-9.1.3-1.fc17 (2012-2508) NASL family CentOS Local Security Checks NASL id CENTOS_RHSA-2012-0678.NASL description Updated postgresql84 and postgresql packages that fix three security issues are now available for Red Hat Enterprise Linux 5 and 6 respectively. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. PostgreSQL is an advanced object-relational database management system (DBMS). The pg_dump utility inserted object names literally into comments in the SQL script it produces. An unprivileged database user could create an object whose name includes a newline followed by a SQL command. This SQL command might then be executed by a privileged user during later restore of the backup dump, allowing privilege escalation. (CVE-2012-0868) When configured to do SSL certificate verification, PostgreSQL only checked the first 31 characters of the certificate last seen 2020-06-01 modified 2020-06-02 plugin id 59214 published 2012-05-22 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/59214 title CentOS 5 / 6 : postgresql / postgresql84 (CESA-2012:0678) NASL family Scientific Linux Local Security Checks NASL id SL_20120521_POSTGRESQL_ON_SL5_X.NASL description PostgreSQL is an advanced object-relational database management system (DBMS). The pg_dump utility inserted object names literally into comments in the SQL script it produces. An unprivileged database user could create an object whose name includes a newline followed by a SQL command. This SQL command might then be executed by a privileged user during later restore of the backup dump, allowing privilege escalation. (CVE-2012-0868) CREATE TRIGGER did not do a permissions check on the trigger function to be called. This could possibly allow an authenticated database user to call a privileged trigger function on data of their choosing. (CVE-2012-0866) All PostgreSQL users are advised to upgrade to these updated packages, which contain backported patches to correct these issues. If the postgresql service is running, it will be automatically restarted after installing this update. last seen 2020-03-18 modified 2012-08-01 plugin id 61317 published 2012-08-01 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/61317 title Scientific Linux Security Update : postgresql on SL5.x i386/x86_64 (20120521) NASL family Scientific Linux Local Security Checks NASL id SL_20120521_POSTGRESQL_AND_POSTGRESQL84_ON_SL5_X.NASL description PostgreSQL is an advanced object-relational database management system (DBMS). The pg_dump utility inserted object names literally into comments in the SQL script it produces. An unprivileged database user could create an object whose name includes a newline followed by a SQL command. This SQL command might then be executed by a privileged user during later restore of the backup dump, allowing privilege escalation. (CVE-2012-0868) When configured to do SSL certificate verification, PostgreSQL only checked the first 31 characters of the certificate last seen 2020-03-18 modified 2012-08-01 plugin id 61316 published 2012-08-01 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/61316 title Scientific Linux Security Update : postgresql and postgresql84 on SL5.x, SL6.x i386/x86_64 (20120521) NASL family Amazon Linux Local Security Checks NASL id ALA_ALAS-2012-82.NASL description The pg_dump utility inserted object names literally into comments in the SQL script it produces. An unprivileged database user could create an object whose name includes a newline followed by a SQL command. This SQL command might then be executed by a privileged user during later restore of the backup dump, allowing privilege escalation. (CVE-2012-0868) When configured to do SSL certificate verification, PostgreSQL only checked the first 31 characters of the certificate last seen 2020-06-01 modified 2020-06-02 plugin id 69689 published 2013-09-04 reporter This script is Copyright (C) 2013-2018 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/69689 title Amazon Linux AMI : postgresql8 (ALAS-2012-82)
Redhat
advisories |
| ||||||||
rpms |
|
Seebug
bulletinFamily | exploit |
description | CVE-2012-0866 CVE-2012-0867 CVE-2012-0868 PostgreSQL是一款对象关系型数据库管理系统,支持扩展的SQL标准子集 PostgreSQL存在多个安全漏洞,允许恶意用户绕过部分安全限制,进行伪造攻击或操作某些数据 -在触发函数上没有对CREATE TRIGGER进行正确的权限检查,可利用此漏洞标记触发函数为SECURITY DEFINER,可授权EXECUTE权限 -在校验SSL证书的公用名时不正确把名称截断为32个字符,可导致不正确校验伪造证书 -当向评注注入对象名时pg_dump存在输入过滤错误,可被利用通过换行字符转义评注,向DUMP脚本注入SQL命令 0 PostgreSQL 8.x PostgreSQL 9.x 厂商解决方案 PostgreSQL ----- PostgreSQL 9.1.3, 9.0.7, 8.4.11或8.3.18已经修复此漏洞,建议用户下载使用: http://www.postgresql.org/ |
id | SSV:30152 |
last seen | 2017-11-19 |
modified | 2012-02-29 |
published | 2012-02-29 |
reporter | Root |
title | PostgreSQL 8.x/9.x 存在多个安全漏洞 |
References
- http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705
- http://lists.opensuse.org/opensuse-updates/2012-09/msg00060.html
- http://rhn.redhat.com/errata/RHSA-2012-0677.html
- http://rhn.redhat.com/errata/RHSA-2012-0678.html
- http://secunia.com/advisories/49272
- http://secunia.com/advisories/49273
- http://www.debian.org/security/2012/dsa-2418
- http://www.mandriva.com/security/advisories?name=MDVSA-2012:026
- http://www.mandriva.com/security/advisories?name=MDVSA-2012:027
- http://www.mandriva.com/security/advisories?name=MDVSA-2012:092
- http://www.postgresql.org/about/news/1377/
- http://www.postgresql.org/docs/8.3/static/release-8-3-18.html
- http://www.postgresql.org/docs/8.4/static/release-8-4-11.html
- http://www.postgresql.org/docs/9.0/static/release-9-0-7.html
- http://www.postgresql.org/docs/9.1/static/release-9-1-3.html
- http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705
- http://www.postgresql.org/docs/9.1/static/release-9-1-3.html
- http://www.postgresql.org/docs/9.0/static/release-9-0-7.html
- http://www.postgresql.org/docs/8.4/static/release-8-4-11.html
- http://www.postgresql.org/docs/8.3/static/release-8-3-18.html
- http://www.postgresql.org/about/news/1377/
- http://www.mandriva.com/security/advisories?name=MDVSA-2012:092
- http://www.mandriva.com/security/advisories?name=MDVSA-2012:027
- http://www.mandriva.com/security/advisories?name=MDVSA-2012:026
- http://www.debian.org/security/2012/dsa-2418
- http://secunia.com/advisories/49273
- http://secunia.com/advisories/49272
- http://rhn.redhat.com/errata/RHSA-2012-0678.html
- http://rhn.redhat.com/errata/RHSA-2012-0677.html
- http://lists.opensuse.org/opensuse-updates/2012-09/msg00060.html