Vulnerabilities > CVE-2005-0227 - Code Injection vulnerability in Postgresql

047910
CVSS 0.0 - NONE
Attack vector
UNKNOWN
Attack complexity
UNKNOWN
Privileges required
UNKNOWN
Confidentiality impact
UNKNOWN
Integrity impact
UNKNOWN
Availability impact
UNKNOWN

Summary

PostgreSQL (pgsql) 7.4.x, 7.2.x, and other versions allows local users to load arbitrary shared libraries and execute code via the LOAD extension.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • 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.
  • Manipulating User-Controlled Variables
    This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An attacker can override environment variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the attacker can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.

Nessus

  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2005-138.NASL
    descriptionUpdated postresql packages that correct various security issues are now available for Red Hat Enterprise Linux 4. This update has been rated as having important security impact by the Red Hat Security Response Team. A flaw in the LOAD command in PostgreSQL was discovered. A local user could use this flaw to load arbitrary shared libraries and therefore execute arbitrary code, gaining the privileges of the PostgreSQL server. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2005-0227 to this issue. A permission checking flaw in PostgreSQL was discovered. A local user could bypass the EXECUTE permission check for functions by using the CREATE AGGREGATE command. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2005-0244 to this issue. Multiple buffer overflows were found in PL/PgSQL. A database user who has permissions to create plpgsql functions could trigger this flaw which could lead to arbitrary code execution, gaining the privileges of the PostgreSQL server. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the names CVE-2005-0245 and CVE-2005-0247 to these issues. A flaw in the integer aggregator (intagg) contrib module for PostgreSQL was found. A user could create carefully crafted arrays and cause a denial of service (crash). The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2005-0246 to this issue. The update also fixes some minor problems, notably conflicts with SELinux. Users of postgresql should update to these erratum packages that contain patches and are not vulnerable to these issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id17192
    published2005-02-22
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/17192
    titleRHEL 4 : postgresql (RHSA-2005:138)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-668.NASL
    descriptionJohn Heasman and others discovered a bug in the PostgreSQL engine which would allow any user load an arbitrary local library into it.
    last seen2020-06-01
    modified2020-06-02
    plugin id16342
    published2005-02-10
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/16342
    titleDebian DSA-668-1 : postgresql - privilege escalation
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_5D4251897A0311D9A9E70001020EED82.NASL
    descriptionJohn Heasman and others disovered that non-privileged users could use the LOAD extension to load arbitrary libraries into the postgres server process space. This could be used by non-privileged local users to execute arbitrary code with the privileges of the postgresql server.
    last seen2020-06-01
    modified2020-06-02
    plugin id18949
    published2005-07-13
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/18949
    titleFreeBSD : postgresql -- privilege escalation vulnerability (5d425189-7a03-11d9-a9e7-0001020eed82)
  • NASL familyDatabases
    NASL idPOSTGRESQL_MULTIPLE_FLAWS2.NASL
    descriptionThe remote PostgreSQL server, according to its version number, is vulnerable to multiple flaws that could allow an attacker who has the rights to query the remote database to obtain a shell on this host.
    last seen2020-06-01
    modified2020-06-02
    plugin id16309
    published2005-02-03
    reporterThis script is Copyright (C) 2005-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/16309
    titlePostgreSQL < 7.2.7 / 7.3.9 / 7.4.7 / 8.0.1 Multiple Vulnerabilities
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2005-141.NASL
    descriptionUpdated PostgreSQL packages to fix various security flaws are now available for Red Hat Enterprise Linux 3. PostgreSQL is an advanced Object-Relational database management system (DBMS). A flaw in the LOAD command in PostgreSQL was discovered. A local user could use this flaw to load arbitrary shared librarys and therefore execute arbitrary code, gaining the privileges of the PostgreSQL server. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2005-0227 to this issue. A permission checking flaw in PostgreSQL was discovered. A local user could bypass the EXECUTE permission check for functions by using the CREATE AGGREGATE command. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2005-0244 to this issue. Multiple buffer overflows were found in PL/PgSQL. A database user who has permissions to create plpgsql functions could trigger this flaw which could lead to arbitrary code execution, gaining the privileges of the PostgreSQL server. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the names CVE-2005-0245 and CVE-2005-0247 to these issues. A flaw in the integer aggregator (intagg) contrib module for PostgreSQL was found. A user could create carefully crafted arrays and cause a denial of service (crash). The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2005-0246 to this issue. Users of PostgreSQL are advised to update to these erratum packages which are not vulnerable to these issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id16386
    published2005-02-14
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/16386
    titleRHEL 3 : rh-postgresql (RHSA-2005:141)
  • NASL familyMandriva Local Security Checks
    NASL idMANDRAKE_MDKSA-2005-040.NASL
    descriptionA number of vulnerabilities were found and corrected in the PostgreSQL DBMS : A flaw in the LOAD command could be abused by a local user to load arbitrary shared libraries and as a result execute arbitrary code with the privileges of the user running the postgresql server (CVE-2005-0227). A permission checking flaw was found where a local user could bypass the EXECUTE permission check for functions using the CREATE AGGREGATE command (CVE-2005-0244). Multiple buffer overflows were discovered in PL/PgSQL. A database user with permission to create plpgsql functions could trigger these flaws which could then lead to arbitrary code execution with the privileges of the user running the postgresql server (CVE-2005-0245 and CVE-2005-0247). Finally, a flaw in the integer aggregator (intagg) contrib module was found. A user could create carefully crafted arrays and crash the server, causing a Denial of Service (CVE-2005-0246). The updated packages have been patched to correct these problems.
    last seen2020-06-01
    modified2020-06-02
    plugin id17139
    published2005-02-18
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/17139
    titleMandrake Linux Security Advisory : postgresql (MDKSA-2005:040)
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2005-150.NASL
    descriptionUpdated PostgreSQL packages to fix various security flaws are now available for Red Hat Enterprise Linux 2.1AS. This update has been rated as having important security impact by the Red Hat Security Response Team. PostgreSQL is an advanced Object-Relational database management system (DBMS). A flaw in the LOAD command in PostgreSQL was discovered. A local user could use this flaw to load arbitrary shared libraries and therefore execute arbitrary code, gaining the privileges of the PostgreSQL server. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2005-0227 to this issue. Multiple buffer overflows were found in PL/PgSQL. A database user who has permissions to create plpgsql functions could trigger this flaw which could lead to arbitrary code execution, gaining the privileges of the PostgreSQL server. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the names CVE-2005-0245 and CVE-2005-0247 to these issues. Users of PostgreSQL are advised to update to these erratum packages which are not vulnerable to these issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id17129
    published2005-02-16
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/17129
    titleRHEL 2.1 : postgresql (RHSA-2005:150)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2005-124.NASL
    description - Mon Feb 07 2005 Tom Lane <tgl at redhat.com> 7.4.7-1.FC3.2 - Put regression tests under /usr/lib64 on 64-bit archs, since .so files are not architecture-independent. - Mon Feb 07 2005 Tom Lane <tgl at redhat.com> 7.4.7-1.FC3.1 - Update to PostgreSQL 7.4.7 (fixes CVE-2005-0227 and other issues). - Update to PyGreSQL 3.6.1. - Add versionless symlinks to jar files (bz#145744) - Add restorecon to postgresql.init in order to restore database to correct SELinux context. 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 seen2020-06-01
    modified2020-06-02
    plugin id16353
    published2005-02-10
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/16353
    titleFedora Core 3 : postgresql-7.4.7-1.FC3.2 (2005-124)
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200502-08.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200502-08 (PostgreSQL: Multiple vulnerabilities) PostgreSQL
    last seen2020-06-01
    modified2020-06-02
    plugin id16445
    published2005-02-14
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/16445
    titleGLSA-200502-08 : PostgreSQL: Multiple vulnerabilities
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2005-125.NASL
    description - Mon Feb 07 2005 Tom Lane <tgl at redhat.com> 7.4.7-1.FC2.2 - Put regression tests under /usr/lib64 on 64-bit archs, since .so files are not architecture-independent. - Mon Feb 07 2005 Tom Lane <tgl at redhat.com> 7.4.7-1.FC2.1 - Update to PostgreSQL 7.4.7 (fixes CVE-2005-0227 and other issues). - Update to PyGreSQL 3.6.1. - Add versionless symlinks to jar files (bz#145744) 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 seen2020-06-01
    modified2020-06-02
    plugin id16354
    published2005-02-10
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/16354
    titleFedora Core 2 : postgresql-7.4.7-1.FC2.2 (2005-125)

Oval

accepted2013-04-29T04:03:49.587-04:00
classvulnerability
contributors
  • nameAharon Chernin
    organizationSCAP.com, LLC
  • nameDragos Prisaca
    organizationG2, Inc.
definition_extensions
  • commentThe operating system installed on the system is Red Hat Enterprise Linux 3
    ovaloval:org.mitre.oval:def:11782
  • commentCentOS Linux 3.x
    ovaloval:org.mitre.oval:def:16651
  • commentThe operating system installed on the system is Red Hat Enterprise Linux 4
    ovaloval:org.mitre.oval:def:11831
  • commentCentOS Linux 4.x
    ovaloval:org.mitre.oval:def:16636
  • commentOracle Linux 4.x
    ovaloval:org.mitre.oval:def:15990
descriptionPostgreSQL (pgsql) 7.4.x, 7.2.x, and other versions allows local users to load arbitrary shared libraries and execute code via the LOAD extension.
familyunix
idoval:org.mitre.oval:def:10234
statusaccepted
submitted2010-07-09T03:56:16-04:00
titleBuffer overflow in the readline function in util/texindex.c, as used by the (1) texi2dvi and (2) texindex commands, in texinfo 4.8 and earlier allows local users to execute arbitrary code via a crafted Texinfo file.
version26

Redhat

advisories
  • rhsa
    idRHSA-2005:138
  • rhsa
    idRHSA-2005:150
rpms
  • postgresql-0:7.4.7-2.RHEL4.1
  • postgresql-contrib-0:7.4.7-2.RHEL4.1
  • postgresql-debuginfo-0:7.4.7-2.RHEL4.1
  • postgresql-devel-0:7.4.7-2.RHEL4.1
  • postgresql-docs-0:7.4.7-2.RHEL4.1
  • postgresql-jdbc-0:7.4.7-2.RHEL4.1
  • postgresql-libs-0:7.4.7-2.RHEL4.1
  • postgresql-pl-0:7.4.7-2.RHEL4.1
  • postgresql-python-0:7.4.7-2.RHEL4.1
  • postgresql-server-0:7.4.7-2.RHEL4.1
  • postgresql-tcl-0:7.4.7-2.RHEL4.1
  • postgresql-test-0:7.4.7-2.RHEL4.1
  • rh-postgresql-0:7.3.9-2
  • rh-postgresql-contrib-0:7.3.9-2
  • rh-postgresql-debuginfo-0:7.3.9-2
  • rh-postgresql-devel-0:7.3.9-2
  • rh-postgresql-docs-0:7.3.9-2
  • rh-postgresql-jdbc-0:7.3.9-2
  • rh-postgresql-libs-0:7.3.9-2
  • rh-postgresql-pl-0:7.3.9-2
  • rh-postgresql-python-0:7.3.9-2
  • rh-postgresql-server-0:7.3.9-2
  • rh-postgresql-tcl-0:7.3.9-2
  • rh-postgresql-test-0:7.3.9-2