A security flaw was found in the way pgcrypto contrib module of PostgreSQL, an advanced Object-Relational database management system, performed (re)initialization of its internal random number generator [if the server was configured with ssl=on option, and incoming session did not actually use the SSL encryption, the OpenSSL random number generator was initialized only in the moment of the PostgreSQL server startup, and not in the moment of child process(es) fork]. As a result, certain pgcrypto module functions (those requiring random seed) would produce weaker results, possibly allowing attackers to conduct other attacks.
References: [1] http://www.postgresql.org/message-id/CACMqXCJRoyko5dCys5mzWF3WJtwv46fEYX39cusFAZDvocwg@mail.gmail.com
A typical CREATE USER MAPPING command persists a foreign password in an "option" of the user mapping. Contrary to its documentation and at variance with the informationschema.usermappingoptions view, the pgusermappings view discloses user mapping options to any user having USAGE privilege on the associated foreign server. If someone revokes the USAGE grant, an attacker having captured the password this way might use it to connect another way. An attacker may use the password to run arbitrary queries against the server or others accepting the same credentials, not just the limited queries one can issue via foreign tables.
Affected versions: 8.4 - 9.6
CRLF injection vulnerability in pgdump 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 allows user-assisted remote attackers to execute arbitrary SQL commands via a crafted file containing object names with newlines, which are inserted into an SQL script that is used when the database is restored.
An array index error, leading to out of heap-based buffer bounds read flaw was found in the way PostgreSQL, an advanced Object-Relational database management system (DBMS), performed retrieval of textual form of error message representation when processing certain enumeration types. An unprivileged database user could issue a specially-crafted SQL query that, when processed by the server component of the PostgreSQL service, would lead to denial of service (daemon crash) or disclosure (of certain portions of) server memory.
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.
An XML External Entities (XXE) attack was found in the way xmlparse routine, used for producing of xml data type value from character data, of PostgreSQL, an advanced Object-Relational database management system (DBMS), performed parsing of provided character data. An unprivileged database user could issue a specially-crafted SQL query to the PostgreSQL server that, when processed could lead to attacker's ability to read arbitrary system files, accessible with privileges of the user running the PostgreSQL server.
References: [1] http://www.postgresql.org/docs/8.3/static/release-8-3-20.html [2] http://www.postgresql.org/docs/9.0/static/release-9-0-9.html [3] http://www.postgresql.org/docs/9.1/static/release-9-1-5.html
A denial of service flaw was found in the way command switch parsing logic of PostgreSQL, an advanced Object-Relational database management system, processed certain database names (a database name beginning with '-' character was interpreted as it if were a command line switch for a standalone backend). A remote attacker could issue a specially-crafted SQL query that, when processed by the PostgreSQL server would lead to unauthorized modification of the server's configuration file or attacker's ability to replace server's critical database / table with a junk file (of their choose), during the server's crash recovery process (denial of service).
It was found that the buffers used to hold datetime output were too small. Long output could lead to a stack-based buffer overflow, possibly allowing an authenticated database user to crash the PostgreSQL server or execute arbitrary code.
Acknowledgements:
Red Hat would like to thank the PostgreSQL project for reporting this issue. Upstream acknowledges Noah Misch as the original reporter.
A Coverity scan revealed a number of possible buffer overflow flaws in PostgreSQL. An authenticated database user could possibly use these flaws to crash the PostgreSQL server or execute arbitrary code.
Acknowledgements:
Red Hat would like to thank the PostgreSQL project for reporting this issue. Upstream acknowledges Peter Eisentraut and Jozef Mlich as the original reporters.
Multiple integer overflow flaws, leading to buffer overflows, were found in PostgreSQL. An authenticated database user could possibly use these flaws to crash the PostgreSQL server or execute arbitrary code.
Acknowledgements:
Red Hat would like to thank the PostgreSQL project for reporting this issue. Upstream acknowledges Heikki Linnakangas and Noah Misch as the original reporters.
Common Vulnerabilities and Exposures assigned an identifier CVE-2014-2669 to the following vulnerability:
Name: CVE-2014-2669 URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-2669 Assigned: 20140328 Reference: http://wiki.postgresql.org/wiki/20140220securityrelease Reference: http://www.postgresql.org/about/news/1506/ Reference: http://www.postgresql.org/support/security/ Reference: https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a Reference: DEBIAN:DSA-2864 Reference: http://www.debian.org/security/2014/dsa-2864 Reference: DEBIAN:DSA-2865 Reference: http://www.debian.org/security/2014/dsa-2865
Multiple integer overflows in contrib/hstore/hstoreio.c in PostgreSQL 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact via vectors related to the (1) hstorerecv, (2) hstorefromarrays, and (3) hstorefromarray functions in contrib/hstore/hstoreio.c; and the (4) hstoreArrayToPairs function in contrib/hstore/hstoreop.c, which triggers a buffer overflow. NOTE: this issue was SPLIT from CVE-2014-0064 because it has a different set of affected versions.
It was found that the procedural language (PLs) validator functions could possibly be leveraged for limited code execution. An authenticated database user could possibly use this flaw to escalate their privileges.
Acknowledgements:
Red Hat would like to thank the PostgreSQL project for reporting this issue. Upstream acknowledges Andres Freund as the original reporter.
A vulnerability in crypt() function in pgCrypto extension was found. Certain short salts can crash the backend or disclose a few bytes of backend memory.
Upstream patch:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=1d812c8b059d0b9b1fba4a459c9876de0f6259b6
External reference:
http://www.postgresql.org/about/news/1615/
An XML External Entities (XXE) attack was found in the way xml2 contrib module, providing XPath querying and XSLT functionality, of PostgreSQL, an advanced Object-Relational database management system (DBMS), performed processing of XSLT documents. When the xml2 contrib module was enabled an unprivileged database user could issue a specially-crafted SQL query to the PostgreSQL server that, when processed could lead to attacker's ability to read or write (alter) arbitrary system files, accessible with the privileges of the user running the PostgreSQL server.
References: [1] http://www.postgresql.org/docs/8.3/static/release-8-3-20.html [2] http://www.postgresql.org/docs/9.0/static/release-9-0-9.html [3] http://www.postgresql.org/docs/9.1/static/release-9-1-5.html
A race condition when using CREATE INDEX could cause lookups to find table names (of the same name) in the wrong schema, allowing indexes to be created on tables the caller does not own. An authenticated database user could possibly leverage this flaw to escalate their privileges.
Acknowledgements:
Red Hat would like to thank the PostgreSQL project for reporting this issue. Upstream acknowledges Robert Haas and Andres Freund as the original reporters.
The "make check" command for the test suites in PostgreSQL 9.3.3 and earlier does not properly invoke initdb to specify the authentication requirements for a database cluster to be used for the tests, which allows local users to gain privileges by leveraging access to this cluster.
PostgreSQL 8.4.x before 8.4.11, 9.0.x before 9.0.7, and 9.1.x before 9.1.3 truncates the common name to only 32 characters when verifying SSL certificates, which allows remote attackers to spoof connections when the host name is exactly 32 characters.
Double free vulnerability in PostgreSQL before 9.0.20, 9.1.x before 9.1.16, 9.2.x before 9.2.11, 9.3.x before 9.3.7, and 9.4.x before 9.4.2 allows remote attackers to cause a denial of service (crash) by closing an SSL session at a time when the authentication timeout will expire during the session shutdown sequence.
PostgreSQL 8.3.x before 8.3.19, 8.4.x before 8.4.12, 9.0.x before 9.0.8, and 9.1.x before 9.1.4 allows remote authenticated users to cause a denial of service (server crash) by adding the (1) SECURITY DEFINER or (2) SET attributes to a procedural language's call handler.
A security flaw was found in the way REPLICATION privilege checking mechanism of PostgreSQL, an advanced Object-Relational database management system, performed user privilege verification when preparing and finishing of on-line backup(s). An unprivileged database user could use this flaw to interfere with succesful creation of the routine backups.
It was found that the chkpass extension did not check the result of a call to crypt(). An authenticated database user could possibly trigger this flaw and cause PostgreSQL to crash.
Acknowledgements:
Red Hat would like to thank the PostgreSQL project for reporting this issue. Upstream acknowledges Honza Horak and Bruce Momjian as the original reporters.
PostgreSQL before 8.4.20, 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 does not properly enforce the ADMIN OPTION restriction, which allows remote authenticated members of a role to add or remove arbitrary users to that role by calling the SET ROLE command before the associated GRANT command.