Multiple buffer overflows in gram.y for PostgreSQL 8.0.1 and earlier may allow attackers…
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
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
CPE configurations NVD · 28
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:postgresql:postgresql:7.2:*:*:*:*:*:*:* | 7.2 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.2.1:*:*:*:*:*:*:* | 7.2.1 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.2.2:*:*:*:*:*:*:* | 7.2.2 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.2.3:*:*:*:*:*:*:* | 7.2.3 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.2.4:*:*:*:*:*:*:* | 7.2.4 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.2.5:*:*:*:*:*:*:* | 7.2.5 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.2.6:*:*:*:*:*:*:* | 7.2.6 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.2.7:*:*:*:*:*:*:* | 7.2.7 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.3:*:*:*:*:*:*:* | 7.3 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.3.1:*:*:*:*:*:*:* | 7.3.1 | Vulnerable | PostgreSQL |
- 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
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:postgresql:postgresql:7.3.2:*:*:*:*:*:*:* | 7.3.2 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.3.3:*:*:*:*:*:*:* | 7.3.3 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.3.4:*:*:*:*:*:*:* | 7.3.4 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.3.5:*:*:*:*:*:*:* | 7.3.5 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.3.6:*:*:*:*:*:*:* | 7.3.6 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.3.7:*:*:*:*:*:*:* | 7.3.7 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.3.8:*:*:*:*:*:*:* | 7.3.8 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.3.9:*:*:*:*:*:*:* | 7.3.9 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.4:*:*:*:*:*:*:* | 7.4 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.4.1:*:*:*:*:*:*:* | 7.4.1 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.4.2:*:*:*:*:*:*:* | 7.4.2 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.4.3:*:*:*:*:*:*:* | 7.4.3 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.4.4:*:*:*:*:*:*:* | 7.4.4 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.4.5:*:*:*:*:*:*:* | 7.4.5 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.4.6:*:*:*:*:*:*:* | 7.4.6 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:7.4.7:*:*:*:*:*:*:* | 7.4.7 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:8.0.0:*:*:*:*:*:*:* | 8.0.0 | Vulnerable | PostgreSQL |
| cpe:2.3:a:postgresql:postgresql:8.0.1:*:*:*:*:*:*:* | 8.0.1 | Vulnerable | PostgreSQL |
- 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 Importantpostgresql 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 Importantpostgresql 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 Importantrh-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
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Desktop version 3 | Fixed | RHSA-2005:141 |
| Red Hat Enterprise Linux AS (Advanced Server) version 2.1 | Fixed | RHSA-2005:150 |
| Red Hat Enterprise Linux AS version 3 | Fixed | RHSA-2005:141 |
| Red Hat Enterprise Linux AS version 4 | Fixed | RHSA-2005:138 |
| Red Hat Enterprise Linux Desktop version 4 | Fixed | RHSA-2005:138 |
| Red Hat Enterprise Linux ES version 2.1 | Fixed | RHSA-2005:150 |
| Red Hat Enterprise Linux ES version 3 | Fixed | RHSA-2005:141 |
| Red Hat Enterprise Linux ES version 4 | Fixed | RHSA-2005:138 |
| Red Hat Enterprise Linux WS version 2.1 | Fixed | RHSA-2005:150 |
| Red Hat Enterprise Linux WS version 3 | Fixed | RHSA-2005:141 |
| Red Hat Enterprise Linux WS version 4 | Fixed | RHSA-2005:138 |
| Red Hat Linux Advanced Workstation 2.1 | Fixed | RHSA-2005:150 |
Timeline
- 2026-10-02 Threatist record created from CVE-2005-0247
- 2026-10-03 Alias added: GHSA-ggh8-6p3g-2rw7
References
More Postgresql vulnerabilities
- 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
Sources
- CVE-2005-0247 · CVE Program
- CVE-2005-0247 · NVD
- FIRST EPSS
- GHSA-ggh8-6p3g-2rw7 · GitHub Advisory Database · CC BY 4.0
- CVE-2005-0247 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences