PostgreSQL up to 8.0.1 fetch make_fetch_stmt memory corruption

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.7$0-$5k0.00

Summaryinfo

A vulnerability, which was classified as critical, has been found in PostgreSQL. The impacted element is the function make_fetch_stmt of the component fetch. This manipulation causes memory corruption. This vulnerability is handled as CVE-2005-0247. Additionally, an exploit exists. It is advisable to upgrade the affected component.

Detailsinfo

A vulnerability was found in PostgreSQL (Database Software). It has been declared as critical. Affected by this vulnerability is the function make_fetch_stmt of the component fetch. The manipulation with an unknown input leads to a memory corruption vulnerability. The CWE definition for the vulnerability is CWE-119. The product performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:

Multiple buffer overflows in gram.y for PostgreSQL 8.0.1 and earlier may allow attackers to execute arbitrary code via (1) a large number of variables in a SQL statement being handled by the read_sql_construct function, (2) a large number of INTO variables in a SELECT statement being handled by the make_select_stmt function, (3) a large number of arbitrary variables in a SELECT statement being handled by the make_select_stmt function, and (4) a large number of INTO variables in a FETCH statement being handled by the make_fetch_stmt function, a different set of vulnerabilities than CVE-2005-0245.

The weakness was released 05/02/2005 (Website). The advisory is shared at archives.postgresql.org. This vulnerability is known as CVE-2005-0247 since 02/08/2005. The exploitation appears to be easy. The attack can be launched remotely. The successful exploitation needs a single authentication. Technical details and also a public exploit are known.

A public exploit has been developed in ANSI C. It is possible to download the exploit at securityfocus.com. It is declared as proof-of-concept. The vulnerability scanner Nessus provides a plugin with the ID 18973 (FreeBSD : postgresql -- multiple buffer overflows in PL/PgSQL parser (6b4b0b3f-8127-11d9-a9e7-0001020eed82)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family FreeBSD Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 19147 (PostgreSQL Multiple Remote Vulnerabilities).

Upgrading eliminates this vulnerability. A possible mitigation has been published even before and not after the disclosure of the vulnerability.

The vulnerability is also documented in the databases at X-Force (19378), Tenable (18973), SecurityFocus (BID 12417†), OSVDB (13894†) and Vulnerability Center (SBV-7674†). Entries connected to this vulnerability are available at VDB-23909, VDB-24360 and VDB-24359. Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Productinfo

Type

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.3
VulDB Meta Temp Score: 5.7

VulDB Base Score: 6.3
VulDB Temp Score: 5.7
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Memory corruption
CWE: CWE-119
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Programming Language: 🔍
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 18973
Nessus Name: FreeBSD : postgresql -- multiple buffer overflows in PL/PgSQL parser (6b4b0b3f-8127-11d9-a9e7-0001020eed82)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍
Nessus Port: 🔍

OpenVAS ID: 53511
OpenVAS Name: Debian Security Advisory DSA 683-1 (postgresql)
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Timelineinfo

02/01/2005 🔍
02/08/2005 +7 days 🔍
02/16/2005 +8 days 🔍
02/17/2005 +1 days 🔍
04/26/2005 +68 days 🔍
05/02/2005 +6 days 🔍
05/02/2005 +0 days 🔍
07/13/2005 +72 days 🔍
03/10/2015 +3527 days 🔍
07/05/2025 +3770 days 🔍

Sourcesinfo

Product: postgresql.org

Advisory: archives.postgresql.org
Status: Confirmed

CVE: CVE-2005-0247 (🔍)
GCVE (CVE): GCVE-0-2005-0247
GCVE (VulDB): GCVE-100-24361

OVAL: 🔍

X-Force: 19378
SecurityFocus: 12417 - PostgreSQL Multiple Remote Vulnerabilities
OSVDB: 13894 - PostgreSQL make_select_stmt SELECT INTO Variables Overflow
Vulnerability Center: 7674 - Multiple Buffer Overflows in PostgreSQL <= 8.0.1, High

scip Labs: https://www.scip.ch/en/?labs.20161013
See also: 🔍

Entryinfo

Created: 03/10/2015 23:05
Updated: 07/05/2025 16:32
Changes: 03/10/2015 23:05 (75), 06/04/2019 17:33 (5), 07/05/2025 16:32 (20)
Complete: 🔍
Cache ID: 216::103

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you know our Splunk app?

Download it now for free!