Description
Integer overflow in src/backend/executor/nodeHash.c in PostgreSQL 8.4.1 and earlier, and 8.5 through 8.5alpha2, allows remote authenticated users to cause a denial of service (daemon crash) via a SELECT statement with many LEFT JOIN clauses, related to certain hashtable size calculations.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 5 | postgresql +9 | 8.1.21-1.el5_5.1 | RHSA-2010:0429 |
| RHEL 4 | postgresql +10 | 7.4.29-1.el4_8.1 | RHSA-2010:0428 |
| RHEL 3 | rh-postgresql +10 | 7.3.21-3 | RHSA-2010:0427 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- PostgreSQL 8.4.1 - JOIN Hashtable Size Integer Overflow Denial of Service EDB-33729 · dos · Jun 13, 2014 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 3
- RHSA-2010:0429 Red Hat Security Advisory: postgresql security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2010:0428 Red Hat Security Advisory: postgresql security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2010:0427 Red Hat Security Advisory: postgresql security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
References
- [pgsql-bugs] 20091028 BUG #5145: Complex query with lots of LEFT JOIN causes segfault mailing-list
- RHSA-2010:0427 vendor-advisory
- RHSA-2010:0428 vendor-advisory
- oval:org.mitre.oval:def:10691 vdb-entry signature
- http://git.postgresql.org/gitweb?p=postgresql.git%3Ba=commit%3Bh=64b057e6823655fb6c5d1f24a28f236b94dd6c54
- 39820 third-party-advisory
- 38619 vdb-entry
- [oss-security] 20100316 Re: CVE Request: postgresql integer overflow in hash table size calculation mailing-list
- SUSE-SR:2010:014 vendor-advisory
- [pgsql-bugs] 20091030 Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault mailing-list
- [pgsql-bugs] 20091029 Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault mailing-list
- [oss-security] 20100309 CVE Request: postgresql integer overflow in hash table size calculation mailing-list
- [pgsql-bugs] 20091029 Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault mailing-list
- RHSA-2010:0429 vendor-advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=546621
- ADV-2010-1197 vdb-entry