Read the docs
TI-2005-00213 Aliases CVE-2005-0247GHSA-ggh8-6p3g-2rw7

Multiple buffer overflows in gram.y for PostgreSQL 8.0.1 and earlier may allow attackers…

Priority LOW 35CWE-119Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
— Not recorded in CVSS 2.0
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
Partial · Partial · Partial
Fix status
Fixed

Attack profile from CVSS 2.0 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-119 and the CVSS impact.

Summary

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.

Why it matters now

EPSS 0.03512 89th percentileScored 2026-11-07
Fix Fixed Red Hat: 3 advisories

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
——all versions—No fix listedCNA
  • — Vendor— Affected all versions Fixed in — No fix listed CNA

CPE configurations NVD · 28

CPEVersionsRoleVendor
cpe:2.3:a:postgresql:postgresql:7.2:*:*:*:*:*:*:*7.2VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.2.1:*:*:*:*:*:*:*7.2.1VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.2.2:*:*:*:*:*:*:*7.2.2VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.2.3:*:*:*:*:*:*:*7.2.3VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.2.4:*:*:*:*:*:*:*7.2.4VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.2.5:*:*:*:*:*:*:*7.2.5VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.2.6:*:*:*:*:*:*:*7.2.6VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.2.7:*:*:*:*:*:*:*7.2.7VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.3:*:*:*:*:*:*:*7.3VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.3.1:*:*:*:*:*:*:*7.3.1VulnerablePostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.2:*:*:*:*:*:*:* Versions 7.2 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.2.1:*:*:*:*:*:*:* Versions 7.2.1 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.2.2:*:*:*:*:*:*:* Versions 7.2.2 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.2.3:*:*:*:*:*:*:* Versions 7.2.3 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.2.4:*:*:*:*:*:*:* Versions 7.2.4 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.2.5:*:*:*:*:*:*:* Versions 7.2.5 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.2.6:*:*:*:*:*:*:* Versions 7.2.6 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.2.7:*:*:*:*:*:*:* Versions 7.2.7 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.3:*:*:*:*:*:*:* Versions 7.3 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.3.1:*:*:*:*:*:*:* Versions 7.3.1 Vulnerable ·PostgreSQL
Show 18 more CPE
CPEVersionsRoleVendor
cpe:2.3:a:postgresql:postgresql:7.3.2:*:*:*:*:*:*:*7.3.2VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.3.3:*:*:*:*:*:*:*7.3.3VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.3.4:*:*:*:*:*:*:*7.3.4VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.3.5:*:*:*:*:*:*:*7.3.5VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.3.6:*:*:*:*:*:*:*7.3.6VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.3.7:*:*:*:*:*:*:*7.3.7VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.3.8:*:*:*:*:*:*:*7.3.8VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.3.9:*:*:*:*:*:*:*7.3.9VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.4:*:*:*:*:*:*:*7.4VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.4.1:*:*:*:*:*:*:*7.4.1VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.4.2:*:*:*:*:*:*:*7.4.2VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.4.3:*:*:*:*:*:*:*7.4.3VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.4.4:*:*:*:*:*:*:*7.4.4VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.4.5:*:*:*:*:*:*:*7.4.5VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.4.6:*:*:*:*:*:*:*7.4.6VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:7.4.7:*:*:*:*:*:*:*7.4.7VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:8.0.0:*:*:*:*:*:*:*8.0.0VulnerablePostgreSQL
cpe:2.3:a:postgresql:postgresql:8.0.1:*:*:*:*:*:*:*8.0.1VulnerablePostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.3.2:*:*:*:*:*:*:* Versions 7.3.2 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.3.3:*:*:*:*:*:*:* Versions 7.3.3 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.3.4:*:*:*:*:*:*:* Versions 7.3.4 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.3.5:*:*:*:*:*:*:* Versions 7.3.5 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.3.6:*:*:*:*:*:*:* Versions 7.3.6 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.3.7:*:*:*:*:*:*:* Versions 7.3.7 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.3.8:*:*:*:*:*:*:* Versions 7.3.8 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.3.9:*:*:*:*:*:*:* Versions 7.3.9 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.4:*:*:*:*:*:*:* Versions 7.4 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.4.1:*:*:*:*:*:*:* Versions 7.4.1 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.4.2:*:*:*:*:*:*:* Versions 7.4.2 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.4.3:*:*:*:*:*:*:* Versions 7.4.3 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.4.4:*:*:*:*:*:*:* Versions 7.4.4 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.4.5:*:*:*:*:*:*:* Versions 7.4.5 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.4.6:*:*:*:*:*:*:* Versions 7.4.6 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:7.4.7:*:*:*:*:*:*:* Versions 7.4.7 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:8.0.0:*:*:*:*:*:*:* Versions 8.0.0 Vulnerable ·PostgreSQL
  • cpe:2.3:a:postgresql:postgresql:8.0.1:*:*:*:*:*:*:* Versions 8.0.1 Vulnerable ·PostgreSQL

Remediation

Red Hat 3 advisories

  • RHSA-2005:150 Released 2005-02-16 · Red Hat rating Important
    postgresql security update
    • Red Hat Enterprise Linux AS (Advanced Server) version 2.1
    • Red Hat Enterprise Linux ES version 2.1
    • Red Hat Enterprise Linux WS version 2.1
    • Red Hat Linux Advanced Workstation 2.1
  • RHSA-2005:138 Released 2005-02-15 · Red Hat rating Important
    postgresql security update
    • Red Hat Enterprise Linux AS version 4 postgresql-7.4.7-2.RHEL4.1, postgresql-7.4.7-2.RHEL4.1.i386, postgresql-7.4.7-2.RHEL4.1.ia64 +41
    • Red Hat Enterprise Linux Desktop version 4 postgresql-7.4.7-2.RHEL4.1, postgresql-7.4.7-2.RHEL4.1.i386, postgresql-contrib-7.4.7-2.RHEL4.1 +19
    • Red Hat Enterprise Linux ES version 4 postgresql-7.4.7-2.RHEL4.1, postgresql-7.4.7-2.RHEL4.1.i386, postgresql-7.4.7-2.RHEL4.1.ia64 +30
    • Red Hat Enterprise Linux WS version 4 postgresql-7.4.7-2.RHEL4.1, postgresql-7.4.7-2.RHEL4.1.i386, postgresql-7.4.7-2.RHEL4.1.ia64 +30
  • RHSA-2005:141 Released 2005-02-14 · Red Hat rating Important
    rh-postgresql security update
    • Red Hat Desktop version 3 rh-postgresql-7.3.9-2, rh-postgresql-7.3.9-2.i386, rh-postgresql-contrib-7.3.9-2 +19
    • Red Hat Enterprise Linux AS version 3 rh-postgresql-7.3.9-2, rh-postgresql-7.3.9-2.i386, rh-postgresql-7.3.9-2.ia64 +41
    • Red Hat Enterprise Linux ES version 3 rh-postgresql-7.3.9-2, rh-postgresql-7.3.9-2.i386, rh-postgresql-7.3.9-2.ia64 +30
    • Red Hat Enterprise Linux WS version 3 rh-postgresql-7.3.9-2, rh-postgresql-7.3.9-2.i386, rh-postgresql-7.3.9-2.ia64 +30

Vendor assessments

Red Hat

Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Desktop version 3Fixed RHSA-2005:141
Red Hat Enterprise Linux AS (Advanced Server) version 2.1 Fixed RHSA-2005:150
Red Hat Enterprise Linux AS version 3Fixed RHSA-2005:141
Red Hat Enterprise Linux AS version 4Fixed RHSA-2005:138
Red Hat Enterprise Linux Desktop version 4Fixed RHSA-2005:138
Red Hat Enterprise Linux ES version 2.1Fixed RHSA-2005:150
Red Hat Enterprise Linux ES version 3Fixed RHSA-2005:141
Red Hat Enterprise Linux ES version 4Fixed RHSA-2005:138
Red Hat Enterprise Linux WS version 2.1Fixed RHSA-2005:150
Red Hat Enterprise Linux WS version 3Fixed RHSA-2005:141
Red Hat Enterprise Linux WS version 4Fixed RHSA-2005:138
Red Hat Linux Advanced Workstation 2.1Fixed RHSA-2005:150

Timeline

  1. 2026-10-02 Threatist record created from CVE-2005-0247
  2. 2026-10-03 Alias added: GHSA-ggh8-6p3g-2rw7

References

  • TI-2019-06651 In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and… CVSS 3.0HIGH 7.2
  • TI-2017-05187 Improper authentication in postgresql CVSS 3.0CRITICAL 9.8
  • TI-2020-15711 SQL injection in postgresql CVSS 3.1HIGH 8.8
  • TI-2013-01675 Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9… CVSS 2.0MEDIUM 6.5
  • TI-2007-03176 The Database Link library (dblink) in PostgreSQL 8.1 implements functions via CREATE… CVSS 2.0HIGH 9.0
  • TI-2022-01423 SQL injection in postgresql CVSS 3.1HIGH 8.8
See all 202 →

Sources