Buffer overflow in gram.y for PostgreSQL 8.0.0 and earlier may allow attackers to execute arbitrary code via a large number of arguments to
Buffer overflow in gram.y for PostgreSQL 8.0.0 and earlier may allow attackers to execute arbitrary code via a large number of arguments to a refcursor function (gram.y), which leads to a heap-based buffer overflow, a different vulnerability than CVE-2005-0247.
- Published
- Feb 1, 2005
- Updated
- Jun 16, 2026
- EPSS
- 14.5% · 97th percentile
- CWE
- —
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
34
Monitor
Low priority for now.
- CVSS
- 30 / 40 · 7.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 4 / 30 · 14.5%
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| postgresql | postgresql | cpe:2.3:a:postgresql:postgresql |
Using postgresql? Add it to your stack and be the first to know about CVEs like this one. (PostgreSQL)
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- postgresql postgresql7.3 and later · before 7.3.10
- postgresql postgresql7.4 and later · before 7.4.7
- postgresql postgresql8.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:3.0 | postgresql | before 7.2.1-2woody8 | 7.2.1-2woody8 |
| Red Hat:enterprise_linux:3::as | rh-postgresql | before 0:7.3.9-2 | 0:7.3.9-2 |
| Red Hat:enterprise_linux:3::as | rh-postgresql-contrib | before 0:7.3.9-2 | 0:7.3.9-2 |
| Red Hat:enterprise_linux:3::as | rh-postgresql-debuginfo | before 0:7.3.9-2 | 0:7.3.9-2 |
| Red Hat:enterprise_linux:3::as | rh-postgresql-devel | before 0:7.3.9-2 | 0:7.3.9-2 |
| Red Hat:enterprise_linux:3::as | rh-postgresql-docs | before 0:7.3.9-2 | 0:7.3.9-2 |
| Red Hat:enterprise_linux:3::as | rh-postgresql-jdbc | before 0:7.3.9-2 | 0:7.3.9-2 |
| Red Hat:enterprise_linux:3::as | rh-postgresql-libs | before 0:7.3.9-2 | 0:7.3.9-2 |
| Red Hat:enterprise_linux:3::as | rh-postgresql-pl | before 0:7.3.9-2 | 0:7.3.9-2 |
| Red Hat:enterprise_linux:3::as | rh-postgresql-python | before 0:7.3.9-2 | 0:7.3.9-2 |
| Red Hat:enterprise_linux:3::as | rh-postgresql-server | before 0:7.3.9-2 | 0:7.3.9-2 |
| Red Hat:enterprise_linux:3::as | rh-postgresql-tcl | before 0:7.3.9-2 | 0:7.3.9-2 |
| Red Hat:enterprise_linux:3::as | rh-postgresql-test | before 0:7.3.9-2 | 0:7.3.9-2 |
| Red Hat:enterprise_linux:4::as | postgresql | before 0:7.4.7-2.RHEL4.1 | 0:7.4.7-2.RHEL4.1 |
| Red Hat:enterprise_linux:4::as | postgresql-contrib | before 0:7.4.7-2.RHEL4.1 | 0:7.4.7-2.RHEL4.1 |
| Red Hat:enterprise_linux:4::as | postgresql-debuginfo | before 0:7.4.7-2.RHEL4.1 | 0:7.4.7-2.RHEL4.1 |
| Red Hat:enterprise_linux:4::as | postgresql-devel | before 0:7.4.7-2.RHEL4.1 | 0:7.4.7-2.RHEL4.1 |
| Red Hat:enterprise_linux:4::as | postgresql-docs | before 0:7.4.7-2.RHEL4.1 | 0:7.4.7-2.RHEL4.1 |
| Red Hat:enterprise_linux:4::as | postgresql-jdbc | before 0:7.4.7-2.RHEL4.1 | 0:7.4.7-2.RHEL4.1 |
| Red Hat:enterprise_linux:4::as | postgresql-libs | before 0:7.4.7-2.RHEL4.1 | 0:7.4.7-2.RHEL4.1 |
| Red Hat:enterprise_linux:4::as | postgresql-pl | before 0:7.4.7-2.RHEL4.1 | 0:7.4.7-2.RHEL4.1 |
| Red Hat:enterprise_linux:4::as | postgresql-python | before 0:7.4.7-2.RHEL4.1 | 0:7.4.7-2.RHEL4.1 |
| Red Hat:enterprise_linux:4::as | postgresql-server | before 0:7.4.7-2.RHEL4.1 | 0:7.4.7-2.RHEL4.1 |
| Red Hat:enterprise_linux:4::as | postgresql-tcl | before 0:7.4.7-2.RHEL4.1 | 0:7.4.7-2.RHEL4.1 |
+1
Same product
postgresql: all recordsOther highest-scoring records for the same primary product.
- CVE-2017-7546PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allowing remote attackers57Plan
- CVE-2019-9193In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_server_program' group to 55Plan
- CVE-2020-25695A flaw was found in PostgreSQL versions before 13.1, before 12.5, before 11.10, before 10.15, before 9.6.20 and before 9.5.24.49Plan
- CVE-2007-3280The Database Link library (dblink) in PostgreSQL 8.1 implements functions via CREATE statements that map to arbitrary libraries based on the44Plan
- CVE-2013-1899Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows remote attackers to ca42Plan
- CVE-2018-16850postgresql before versions 11.1, 10.6 is vulnerable to a to SQL injection in pg_upgrade and pg_dump via CREATE TRIGGER ...41Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| debian:postgresql | 7.2.1-2woody8 · Debian:3.0 | Package registry (OSV) |
| red hat:postgresql | 0:7.4.7-2.RHEL4.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:postgresql-contrib | 0:7.4.7-2.RHEL4.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:postgresql-debuginfo | 0:7.4.7-2.RHEL4.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:postgresql-devel | 0:7.4.7-2.RHEL4.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:postgresql-docs | 0:7.4.7-2.RHEL4.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:postgresql-jdbc | 0:7.4.7-2.RHEL4.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:postgresql-libs | 0:7.4.7-2.RHEL4.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:postgresql-pl | 0:7.4.7-2.RHEL4.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:postgresql-python | 0:7.4.7-2.RHEL4.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:postgresql-server | 0:7.4.7-2.RHEL4.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:postgresql-tcl | 0:7.4.7-2.RHEL4.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:postgresql-test | 0:7.4.7-2.RHEL4.1 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
Exploit status
Proof of concept available
A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.
Evidence
- Exploit-DB entry ×1
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Exploit-DB entry | dos | 2005-02-01 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- First PoCsame day
- Published
- TodaySep 30, 2026+7912 d
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- P · data can be read
- Integrity
- P · data or configuration can be modified
- Availability
- P · the service can be disrupted
- Attack complexity
- Low
- Confidentiality impact
- P
- Integrity impact
- P
- Availability impact
- P
Weakness class (CWE)
—
CVSS vector
AV:N/AC:L/Au:N/C:P/I:P/A:P
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- archives.postgresql.org/pgsql-committers/2005-01/msg00298.php
- archives.postgresql.org/pgsql-committers/2005-02/msg00049.php
- marc.info/?l=bugtraq&m=110806034116082&w=2
- www.mandriva.com/security/advisories?name=MDKSA-2005:040
- www.novell.com/linux/security/advisories/2005_36_sudo.html
- www.redhat.com/support/errata/RHSA-2005-138.html
- www.redhat.com/support/errata/RHSA-2005-150.html
- www.securityfocus.com/bid/12417
- exchange.xforce.ibmcloud.com/vulnerabilities/19188
- oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10175
Vendor advisories and official records. Exploit/PoC links are deliberately left out.