ID CVE-2002-1398 Type cve Reporter NVD Modified 2016-10-17T22:26:50
Description
Buffer overflow in the date parser for PostgreSQL before 7.2.2 allows attackers to cause a denial of service and possibly execute arbitrary code via a long date string, aka a vulnerability "in handling long datetime input."
{"id": "CVE-2002-1398", "bulletinFamily": "NVD", "title": "CVE-2002-1398", "description": "Buffer overflow in the date parser for PostgreSQL before 7.2.2 allows attackers to cause a denial of service and possibly execute arbitrary code via a long date string, aka a vulnerability \"in handling long datetime input.\"", "published": "2003-01-17T00:00:00", "modified": "2016-10-17T22:26:50", "cvss": {"score": 4.6, "vector": "AV:LOCAL/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2002-1398", "reporter": "NVD", "references": ["http://marc.info/?l=bugtraq&m=102996089613404&w=2", "http://marc.info/?l=bugtraq&m=102978152712430&w=2", "http://archives.postgresql.org/pgsql-announce/2002-08/msg00004.php", "http://www.redhat.com/support/errata/RHSA-2003-001.html", "http://marc.info/?l=postgresql-announce&m=103062536330644", "http://marc.info/?l=bugtraq&m=103021186622725&w=2", "http://www.debian.org/security/2002/dsa-165", "http://marc.info/?l=bugtraq&m=103036987114437&w=2", "http://www.novell.com/linux/security/advisories/2002_038_postgresql.html"], "cvelist": ["CVE-2002-1398"], "type": "cve", "lastseen": "2017-04-18T15:49:50", "history": [{"bulletin": {"assessment": {"href": "", "name": "", "system": ""}, "bulletinFamily": "NVD", "cpe": ["cpe:/a:postgresql:postgresql:7.2.1", "cpe:/a:postgresql:postgresql:7.1.2", "cpe:/a:postgresql:postgresql:7.1.1", "cpe:/a:postgresql:postgresql:6.5.3", "cpe:/a:postgresql:postgresql:7.1", "cpe:/a:postgresql:postgresql:6.3.2", "cpe:/a:postgresql:postgresql:7.1.3", "cpe:/a:postgresql:postgresql:7.2", "cpe:/a:postgresql:postgresql:7.0.3"], "cvelist": ["CVE-2002-1398"], "cvss": {"score": 4.6, "vector": "AV:LOCAL/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "description": "Buffer overflow in the date parser for PostgreSQL before 7.2.2 allows attackers to cause a denial of service and possibly execute arbitrary code via a long date string, aka a vulnerability \"in handling long datetime input.\"", "edition": 1, "hash": "1be1aea717f75528ea3d269ecc492aafb6e11afdfa6e4c3ac3f9fc6215c894c6", "hashmap": [{"hash": "d41d8cd98f00b204e9800998ecf8427e", "key": "scanner"}, {"hash": "601892ece72be3be2f57266ca2354792", "key": "reporter"}, {"hash": "277a851464dacd30fd04f8f01e583577", "key": "cpe"}, {"hash": "56765472680401499c79732468ba4340", "key": "objectVersion"}, {"hash": "6d3f4796275bb54c21a33b82f399cc6d", "key": "assessment"}, {"hash": "b49e5b3d1605094a3def397a0626e428", "key": "description"}, {"hash": "a70e2c4e62005caacf32151866c8632e", "key": "href"}, {"hash": "1716b5fcbb7121af74efdc153d0166c5", "key": "type"}, {"hash": "aa392583a5873cdbc2ed00a4152c8638", "key": "published"}, {"hash": "601892ece72be3be2f57266ca2354792", "key": "bulletinFamily"}, {"hash": "05d3d11e8bb846b2038ac440ef7245fc", "key": "title"}, {"hash": "292f2e293571b0e70e3182b615982dad", "key": "cvss"}, {"hash": "e885e613cf7b287187d0b1bd2dcfaa47", "key": "cvelist"}, {"hash": "6e3051d9153a3874e657b5c5ae59126e", "key": "references"}, {"hash": "9a6aa3016440cede80f315344d47ebd7", "key": "modified"}], "history": [], "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2002-1398", "id": "CVE-2002-1398", "lastseen": "2016-09-03T03:36:28", "modified": "2008-09-10T15:14:30", "objectVersion": "1.2", "published": "2003-01-17T00:00:00", "references": ["http://marc.theaimsgroup.com/?l=bugtraq&m=103036987114437&w=2", "http://marc.theaimsgroup.com/?l=bugtraq&m=103021186622725&w=2", "http://archives.postgresql.org/pgsql-announce/2002-08/msg00004.php", "http://www.redhat.com/support/errata/RHSA-2003-001.html", "http://marc.theaimsgroup.com/?l=bugtraq&m=102996089613404&w=2", "http://marc.theaimsgroup.com/?l=bugtraq&m=102978152712430&w=2", "http://www.debian.org/security/2002/dsa-165", "http://marc.theaimsgroup.com/?l=postgresql-announce&m=103062536330644", "http://www.novell.com/linux/security/advisories/2002_038_postgresql.html"], "reporter": "NVD", "scanner": [], "title": "CVE-2002-1398", "type": "cve", "viewCount": 0}, "differentElements": ["references", "modified"], "edition": 1, "lastseen": "2016-09-03T03:36:28"}], "edition": 2, "hashmap": [{"key": "assessment", "hash": "6d3f4796275bb54c21a33b82f399cc6d"}, {"key": "bulletinFamily", "hash": "601892ece72be3be2f57266ca2354792"}, {"key": "cpe", "hash": "277a851464dacd30fd04f8f01e583577"}, {"key": "cvelist", "hash": "e885e613cf7b287187d0b1bd2dcfaa47"}, {"key": "cvss", "hash": "292f2e293571b0e70e3182b615982dad"}, {"key": "description", "hash": "b49e5b3d1605094a3def397a0626e428"}, {"key": "href", "hash": "a70e2c4e62005caacf32151866c8632e"}, {"key": "modified", "hash": "c81dbbbda57090e750576e16171584de"}, {"key": "objectVersion", "hash": "56765472680401499c79732468ba4340"}, {"key": "published", "hash": "aa392583a5873cdbc2ed00a4152c8638"}, {"key": "references", "hash": "6f8ff51fd6e4d798c435688bd6ab9150"}, {"key": "reporter", "hash": "601892ece72be3be2f57266ca2354792"}, {"key": "scanner", "hash": "d41d8cd98f00b204e9800998ecf8427e"}, {"key": "title", "hash": "05d3d11e8bb846b2038ac440ef7245fc"}, {"key": "type", "hash": "1716b5fcbb7121af74efdc153d0166c5"}], "hash": "5d5f0427b8ef65275d22df8e6d7aedbb4e128d4c870a4eab6c1a47c564c5a6df", "viewCount": 0, "objectVersion": "1.2", "cpe": ["cpe:/a:postgresql:postgresql:7.2.1", "cpe:/a:postgresql:postgresql:7.1.2", "cpe:/a:postgresql:postgresql:7.1.1", "cpe:/a:postgresql:postgresql:6.5.3", "cpe:/a:postgresql:postgresql:7.1", "cpe:/a:postgresql:postgresql:6.3.2", "cpe:/a:postgresql:postgresql:7.1.3", "cpe:/a:postgresql:postgresql:7.2", "cpe:/a:postgresql:postgresql:7.0.3"], "assessment": {"href": "", "name": "", "system": ""}, "scanner": [], "enchantments": {"vulnersScore": 7.5}}
{"result": {"osvdb": [{"id": "OSVDB:6190", "type": "osvdb", "title": "PostgreSQL Date Parser Overflow DoS", "description": "## Vulnerability Description\nA local overflow exists in PostgreSQL. The date parser fails to validate input resulting in a buffer overflow. With a specially crafted request, an attacker can cause the database to crash resulting in a loss of availability.\n## Solution Description\nUpgrade to version 7.2.2 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.\n## Short Description\nA local overflow exists in PostgreSQL. The date parser fails to validate input resulting in a buffer overflow. With a specially crafted request, an attacker can cause the database to crash resulting in a loss of availability.\n## References:\nVendor URL: http://www.pgsql.com/\n[Vendor Specific Advisory URL](http://www.linuxsecurity.com/advisories/other_advisory-2309.html)\n[Vendor Specific Advisory URL](http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2002:062-1)\n[Vendor Specific Advisory URL](http://www.linuxsecurity.com/advisories/immunix_advisory-3150.html)\n[Vendor Specific Advisory URL](http://distro.conectiva.com/atualizacoes/?id=a&anuncio=000524)\n[Vendor Specific Advisory URL](ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SN-02:05.asc)\n[Vendor Specific Advisory URL](http://rhn.redhat.com/errata/RHSA-2003-010.html)\n[Vendor Specific Advisory URL](http://www.debian.org/security/2002/dsa-165)\n[Vendor Specific Advisory URL](http://rhn.redhat.com/errata/RHSA-2003-001.html)\nMail List Post: http://marc.theaimsgroup.com/?l=bugtraq&m=103021186622725&w=2\nMail List Post: http://marc.theaimsgroup.com/?l=bugtraq&m=102978152712430&w=2\nMail List Post: http://archives.neohapsis.com/archives/bugtraq/2002-08/0173.html\nMail List Post: http://archives.neohapsis.com/archives/bugtraq/2002-08/0258.html\nISS X-Force ID: 9892\n[CVE-2002-1398](https://vulners.com/cve/CVE-2002-1398)\nBugtraq ID: 6612\n", "published": "2002-08-19T00:00:00", "cvss": {"score": 4.6, "vector": "AV:LOCAL/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "href": "https://vulners.com/osvdb/OSVDB:6190", "cvelist": ["CVE-2002-1398"], "lastseen": "2017-04-28T13:20:01"}], "debian": [{"id": "DSA-165", "type": "debian", "title": "postgresql -- buffer overflows", "description": "Mordred Labs and others found several vulnerabilities in PostgreSQL, an object-relational SQL database. They are inherited from several buffer overflows and integer overflows. Specially crafted long date and time input, currency, repeat data and long timezone names could cause the PostgreSQL server to crash as well as specially crafted input data for lpad() and rpad(). More buffer/integer overflows were found in circle_poly(), path_encode() and path_addr().\n\nExcept for the last three, these problems are fixed in the upstream release 7.2.2 of PostgreSQL which is the recommended version to use.\n\nMost of these problems do not exist in the version of PostgreSQL that Debian ships in the potato release since the corresponding functionality is not yet implemented. However, PostgreSQL 6.5.3 is quite old and may bear more risks than we are aware of, which may include further buffer overflows, and certainly include bugs that threaten the integrity of your data.\n\nYou are strongly advised not to use this release but to upgrade your system to Debian 3.0 (stable) including PostgreSQL release 7.2.1 instead, where many bugs have been fixed and new features introduced to increase compatibility with the SQL standards.\n\nIf you consider an upgrade, please make sure to dump the entire database system using the pg_dumpall utility. Please take into consideration that the newer PostgreSQL is more strict in its input handling. This means that tests like \"foo = NULL\" which are not valid won't be accepted anymore. It also means that when using UNICODE encoding, ISO 8859-1 and ISO 8859-15 are no longer valid encodings to use when inserting data into the relation. In such a case you are advised to convert the dump in question using recode latin1..utf-16.\n\nThese problems have been fixed in version 7.2.1-2woody2 for the current stable distribution (woody) and in version 7.2.2-2 for the unstable distribution (sid). The old stable distribution (potato) is partially affected and we ship a fixed version 6.5.3-27.2 for it.\n\nWe recommend that you upgrade your PostgreSQL packages.", "published": "2002-09-12T00:00:00", "cvss": {"score": 7.5, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "href": "http://www.debian.org/security/dsa-165", "cvelist": ["CVE-2002-1398", "CVE-2002-1401", "CVE-2002-1402", "CVE-2002-0972", "CVE-2002-1400"], "lastseen": "2016-09-02T18:27:59"}], "suse": [{"id": "SUSE-SA:2002:038", "type": "suse", "title": "remote privilege escalation in postgresql", "description": "The PostgreSQL Object-Relational DBMS was found vulnerable to several security related buffer overflow problems. The buffer overflows are located in: * handling long datetime input * lpad() and rpad() function with multibyte * repeat() function * TZ and SET TIME ZONE environment variables These bugs could just be exploited by attackers who have access to the postgresql server to gain the privileges postgres user ID .", "published": "2002-10-21T15:54:39", "cvss": {"score": 7.5, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "href": "http://lists.opensuse.org/opensuse-security-announce/2002-10/msg00010.html", "cvelist": ["CVE-2002-1398", "CVE-2002-1402", "CVE-2002-0972", "CVE-2002-1400"], "lastseen": "2016-09-04T11:56:36"}], "nessus": [{"id": "POSTGRESQL_MULTIPLE_FLAWS.NASL", "type": "nessus", "title": "PostgreSQL < 7.2.3 Multiple Vulnerabilities", "description": "The remote PostgreSQL server, according to its version number, is vulnerable to various flaws which may allow an attacker who has the rights to query the remote database to obtain a shell on this host.", "published": "2003-03-24T00:00:00", "cvss": {"score": 10.0, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:COMPLETE/I:COMPLETE/A:COMPLETE/"}, "href": "https://www.tenable.com/plugins/index.php?view=single&id=11456", "cvelist": ["CVE-2002-1398", "CVE-2002-1401", "CVE-2002-1402", "CVE-2002-1397", "CVE-2002-1400", "CVE-2002-1399"], "lastseen": "2017-10-29T13:36:46"}, {"id": "MANDRAKE_MDKSA-2002-062.NASL", "type": "nessus", "title": "Mandrake Linux Security Advisory : postgresql (MDKSA-2002:062-1)", "description": "Vulnerabilities were discovered in the Postgresql relational database by Mordred Labs. These vulnerabilities are buffer overflows in the rpad(), lpad(), repeat(), and cash_words() functions. The Postgresql developers also fixed a buffer overflow in functions that deal with time/date and timezone.\n\nFinally, more buffer overflows were discovered by Mordred Labs in the 7.2.2 release that are currently only fixed in CVS. These buffer overflows exist in the circle_poly(), path_encode(), and path_addr() functions.\n\nIn order for these vulnerabilities to be exploited, an attacker must be able to query the server somehow. However, this cannot directly lead to root privilege because the server runs as the postgresql user.\n\nPrior to upgrading, users should dump their database and retain it as backup. You can dump the database by using :\n\n$ pg_dumpall > db.out\n\nIf you need to restore from the backup, you can do so by using :\n\n$ psql -f db.out template1\n\nUpdate :\n\nThe previous update missed a few small fixes, including a buffer overflow in the cash_words() function that allows local users to cause a DoS and possibly execute arbitrary code via a malformed argument in Postgresql 7.2 and earlier. As well, buffer overflows in the TZ and SET TIME ZONE environment variables for Postgresql 7.2.1 and earlier can allow local users to cause a DoS and possibly execute arbitrary code.", "published": "2004-07-31T00:00:00", "cvss": {"score": 7.5, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "href": "https://www.tenable.com/plugins/index.php?view=single&id=13963", "cvelist": ["CVE-2002-1398", "CVE-2002-1401", "CVE-2002-1402", "CVE-2002-0972", "CVE-2002-1397", "CVE-2002-1400"], "lastseen": "2017-10-29T13:37:56"}, {"id": "DEBIAN_DSA-165.NASL", "type": "nessus", "title": "Debian DSA-165-1 : postgresql - buffer overflows", "description": "Mordred Labs and others found several vulnerabilities in PostgreSQL, an object-relational SQL database. They are inherited from several buffer overflows and integer overflows. Specially crafted long date and time input, currency, repeat data and long timezone names could cause the PostgreSQL server to crash as well as specially crafted input data for lpad() and rpad(). More buffer/integer overflows were found in circle_poly(), path_encode() and path_addr().\n\nExcept for the last three, these problems are fixed in the upstream release 7.2.2 of PostgreSQL which is the recommended version to use.\n\nMost of these problems do not exist in the version of PostgreSQL that Debian ships in the potato release since the corresponding functionality is not yet implemented. However, PostgreSQL 6.5.3 is quite old and may bear more risks than we are aware of, which may include further buffer overflows, and certainly include bugs that threaten the integrity of your data.\n\nYou are strongly advised not to use this release but to upgrade your system to Debian 3.0 (stable) including PostgreSQL release 7.2.1 instead, where many bugs have been fixed and new features introduced to increase compatibility with the SQL standards.\n\nIf you consider an upgrade, please make sure to dump the entire database system using the pg_dumpall utility. Please take into consideration that the newer PostgreSQL is more strict in its input handling. This means that tests like 'foo = NULL' which are not valid won't be accepted anymore. It also means that when using UNICODE encoding, ISO 8859-1 and ISO 8859-15 are no longer valid encodings to use when inserting data into the relation. In such a case you are advised to convert the dump in question usingrecode latin1..utf-16.\n\nThese problems have been fixed in version 7.2.1-2woody2 for the current stable distribution (woody) and in version 7.2.2-2 for the unstable distribution (sid). The old stable distribution (potato) is partially affected and we ship a fixed version 6.5.3-27.2 for it.", "published": "2004-09-29T00:00:00", "cvss": {"score": 7.5, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "href": "https://www.tenable.com/plugins/index.php?view=single&id=15002", "cvelist": ["CVE-2002-1398", "CVE-2002-1401", "CVE-2002-1402", "CVE-2002-0972", "CVE-2002-1397", "CVE-2002-1400"], "lastseen": "2017-10-29T13:40:55"}, {"id": "REDHAT-RHSA-2002-301.NASL", "type": "nessus", "title": "RHEL 2.1 : postgresql (RHSA-2002:301)", "description": "Updated PostgreSQL packages are available which correct several minor security vulnerabilities.\n\n[Updated 06 Feb 2003] Added fixed packages for Advanced Workstation 2.1\n\nPostgreSQL is an advanced Object-Relational database management system (DBMS). Red Hat Linux Advanced Server 2.1 shipped with PostgreSQL version 7.1.3 which has several security vulnerabilities.\n\nBuffer overflows in PostgreSQL 7.2 allow attackers to cause a denial of service and possibly execute arbitrary code via long arguments to the lpad or rpad functions. CVE-2002-0972\n\nBuffer overflow in the cash_words() function for PostgreSQL 7.2 and earlier allows local users to cause a denial of service and possibly execute arbitrary code via a malformed argument. CVE-2002-1397\n\nBuffer overflow in the date parser for PostgreSQL before 7.2.2 allows attackers to cause a denial of service and possibly execute arbitrary code via a long date string, referred to as a vulnerability 'in handling long datetime input.' CVE-2002-1398\n\nHeap-based buffer overflow in the repeat() function for PostgreSQL before 7.2.2 allows attackers to execute arbitrary code by causing repeat() to generate a large string. CVE-2002-1400\n\nBuffer overflows in circle_poly, path_encode, and path_add allow attackers to cause a denial of service and possibly execute arbitrary code. Note that these issues have been fixed in our packages and in PostgreSQL CVS, but are not included in PostgreSQL version 7.2.2 or 7.2.3. CVE-2002-1401\n\nBuffer overflows in the TZ and SET TIME ZONE enivronment variables for PostgreSQL 7.2.1 and earlier allow local users to cause a denial of service and possibly execute arbitrary code. CVE-2002-1402\n\nNote that these vulnerabilities are only critical on open or shared systems because connecting to the database is required before the vulnerabilities can be exploited.\n\nThe PostgreSQL Global Development Team has released versions of PostgreSQL that fix these vulnerabilities, and these fixes have been isolated and backported into the updated 7.1.3 packages provided with this errata. All users of Red Hat Linux Advanced Server 2.1 who use PostgreSQL are advised to install these updated packages.", "published": "2004-07-06T00:00:00", "cvss": {"score": 7.5, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "href": "https://www.tenable.com/plugins/index.php?view=single&id=12343", "cvelist": ["CVE-2002-1398", "CVE-2002-1401", "CVE-2002-1402", "CVE-2002-0972", "CVE-2002-1397", "CVE-2002-1400"], "lastseen": "2017-10-29T13:39:30"}], "redhat": [{"id": "RHSA-2002:301", "type": "redhat", "title": "(RHSA-2002:301) postgresql security update", "description": "PostgreSQL is an advanced Object-Relational database management system\n(DBMS). Red Hat Linux Advanced Server 2.1 shipped with PostgreSQL version\n7.1.3 which has several security vulnerabilities. \n\nBuffer overflows in PostgreSQL 7.2 allow attackers to cause a denial of\nservice and possibly execute arbitrary code via long arguments to the lpad\nor rpad functions. CAN-2002-0972\n\nBuffer overflow in the cash_words() function for PostgreSQL 7.2 and\nearlier allows local users to cause a denial of service and possibly\nexecute arbitrary code via a malformed argument. CAN-2002-1397\n\nBuffer overflow in the date parser for PostgreSQL before 7.2.2 allows\nattackers to cause a denial of service and possibly execute arbitrary\ncode via a long date string, referred to as a vulnerability \"in handling\nlong datetime input.\" CAN-2002-1398\n\nHeap-based buffer overflow in the repeat() function for PostgreSQL\nbefore 7.2.2 allows attackers to execute arbitrary code by causing\nrepeat() to generate a large string. CAN-2002-1400\n\nBuffer overflows in circle_poly, path_encode, and path_add allow attackers\nto cause a denial of service and possibly execute arbitrary code. Note\nthat these issues have been fixed in our packages and in PostgreSQL CVS,\nbut are not included in PostgreSQL version 7.2.2 or 7.2.3. CAN-2002-1401\n\nBuffer overflows in the TZ and SET TIME ZONE enivronment variables for\nPostgreSQL 7.2.1 and earlier allow local users to cause a denial of service\nand possibly execute arbitrary code. CAN-2002-1402\n\nNote that these vulnerabilities are only critical on open or shared systems\nbecause connecting to the database is required before the vulnerabilities\ncan be exploited.\n\nThe PostgreSQL Global Development Team has released versions of PostgreSQL\nthat fix these vulnerabilities, and these fixes have been isolated and\nbackported into the updated 7.1.3 packages provided with this errata.\nAll users of Red Hat Linux Advanced Server 2.1 who use PostgreSQL are\nadvised to install these updated packages.", "published": "2003-02-06T05:00:00", "cvss": {"score": 7.5, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "href": "https://access.redhat.com/errata/RHSA-2002:301", "cvelist": ["CVE-2002-0972", "CVE-2002-1397", "CVE-2002-1398", "CVE-2002-1400", "CVE-2002-1401", "CVE-2002-1402"], "lastseen": "2018-03-28T01:01:46"}]}}