CVE-2009-4136: Medium severity postgresql common vulnerability

Published Dec 10, 2009
·
Updated

Description of problem: All currently shipped versions of PostgreSQL are vulnerable to a new type of attack pointed out by Gurjeet Singh. The scenario is similar to CVE-2007-6600 in that an attacker must be an authenticated user so that he can create a table with attached indexes, which reference functions he has created. Subsequent maintenance operations performed by database superusers will then have to execute those functions. In -6600 the threat was simply to acquire the caller's privileges directly. However, another possibility is that the index function can modify session-local state in a way that will subvert later operations in the same session. Examples include changing the searchpath so that an attacker-created function will be invoked instead of the intended one, or replacing an existing prepared statement with a new one containing code of the attacker's choosing. There have up to now been only very limited security controls on most session-local state, so it was easy to think of possible attack vectors once the basic issue was recognized.

This attack is less dangerous than -6600 since it only succeeds if the calling session does something subvert-able later. In particular it's not clear that there's any major risk for automatic vacuum operations. But superusers who do manual vacuuming or reindexing are clearly at risk.

Upstream versions due to be announced Monday 12-14 contain assorted fixes meant to mitigate this scenario.

Other sources

PostgreSQL 7.4.x before 7.4.27, 8.0.x before 8.0.23, 8.1.x before 8.1.19, 8.2.x before 8.2.15, 8.3.x before 8.3.9, and 8.4.x before 8.4.2 does not properly manage session-local state during execution of an index function by a database superuser, which allows remote authenticated users to gain privileges via a table with crafted index functions, as demonstrated by functions that modify (1) searchpath or (2) a prepared statement, a related issue to CVE-2007-6600 and CVE-2009-3230.

MITRE

Affected Software

92 affected components
PostgreSQL postgresql=7.4.16
PostgreSQL postgresql=8.1.10
PostgreSQL postgresql=8.1.6
PostgreSQL postgresql=8.2.9
PostgreSQL postgresql=8.0.7
PostgreSQL postgresql=8.0.2
PostgreSQL postgresql=8.1.15
PostgreSQL postgresql=8.1.7
PostgreSQL postgresql=8.3.6
PostgreSQL postgresql=8.4.1
PostgreSQL postgresql=8.2.10
PostgreSQL postgresql=8.0.22
PostgreSQL postgresql=7.4.24
PostgreSQL postgresql=8.2.4
PostgreSQL postgresql=7.4.22
PostgreSQL postgresql=7.4.21
PostgreSQL postgresql=8.0.17
PostgreSQL postgresql=8.0.10
PostgreSQL postgresql=7.4.19
PostgreSQL postgresql=8.2.11
PostgreSQL postgresql=8.1.13
PostgreSQL postgresql=8.0.12
PostgreSQL postgresql=8.2.12
PostgreSQL postgresql=7.4.15
PostgreSQL postgresql=8.0.9
PostgreSQL postgresql=8.0.15
PostgreSQL postgresql=7.4.1
PostgreSQL postgresql=8.2.2
PostgreSQL postgresql=8.3.3
PostgreSQL postgresql=8.0.0
PostgreSQL postgresql=8.1.0
PostgreSQL postgresql=8.1.3
PostgreSQL postgresql=7.4.14
PostgreSQL postgresql=7.4.26
PostgreSQL postgresql=7.4.6
PostgreSQL postgresql=8.3.2
PostgreSQL postgresql=7.4.23
PostgreSQL postgresql=7.4.11
PostgreSQL postgresql=8.0.18
PostgreSQL postgresql=8.2.5
PostgreSQL postgresql=8.0.3
PostgreSQL postgresql=7.4.7
PostgreSQL postgresql=8.1.9
PostgreSQL postgresql=7.4.17
PostgreSQL postgresql=7.4.3
PostgreSQL postgresql=8.2.1
PostgreSQL postgresql=8.3.1
PostgreSQL postgresql=8.1.14
PostgreSQL postgresql=7.4.25
PostgreSQL postgresql=7.4.9
PostgreSQL postgresql=7.4.5
PostgreSQL postgresql=7.4.18
PostgreSQL postgresql=8.3.5
PostgreSQL postgresql=8.0.20
PostgreSQL postgresql=8.3.8
PostgreSQL postgresql=8.0.8
PostgreSQL postgresql=7.4.8
PostgreSQL postgresql=8.2.7
PostgreSQL postgresql=8.0.6
PostgreSQL postgresql=8.1.11
PostgreSQL postgresql=8.2.6
PostgreSQL postgresql=7.4.4
PostgreSQL postgresql=8.0.16
PostgreSQL postgresql=8.3.7
PostgreSQL postgresql=8.1.17
PostgreSQL postgresql=8.0.13
PostgreSQL postgresql=8.1.18
PostgreSQL postgresql=8.1.4
PostgreSQL postgresql=8.0.1
PostgreSQL postgresql=8.1.8
PostgreSQL postgresql=8.3.4
PostgreSQL postgresql=7.4.12
PostgreSQL postgresql=8.0.19
PostgreSQL postgresql=8.1.1
PostgreSQL postgresql=8.1.12
PostgreSQL postgresql=8.1.5
PostgreSQL postgresql=8.0.21
PostgreSQL postgresql=7.4.10
PostgreSQL postgresql=8.1.16
PostgreSQL postgresql=8.2.3
PostgreSQL postgresql=8.0.4
PostgreSQL postgresql=8.0.5
PostgreSQL postgresql=7.4.20
PostgreSQL postgresql=8.0.14
PostgreSQL postgresql=8.2.8
PostgreSQL postgresql=8.2.13
PostgreSQL postgresql=8.2
PostgreSQL postgresql=7.4.2
PostgreSQL postgresql=8.0.11
PostgreSQL postgresql=8.2.14
PostgreSQL postgresql=7.4.13
PostgreSQL postgresql=8.1.2

Event History

Dec 10, 2009
Data Sourced
04:37 PM
DescriptionSeverityAffected Software
Dec 15, 2009
CVE Published
via MITRE·06:00 PM
Data Sourced
via MITRE·06:00 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2009-4136?

CVE-2009-4136 is considered to have a high severity rating due to the potential impact on data integrity and availability.

2

How do I fix CVE-2009-4136?

To fix CVE-2009-4136, upgrade to a patched version of PostgreSQL that does not contain this vulnerability.

3

Which versions of PostgreSQL are affected by CVE-2009-4136?

CVE-2009-4136 affects multiple versions of PostgreSQL, including 7.4.16, 8.0.2, and numerous other specific versions listed in the vulnerability report.

4

What types of attacks can exploit CVE-2009-4136?

CVE-2009-4136 enables authenticated users to perform certain unauthorized operations that could compromise the database.

5

Is there a workaround for CVE-2009-4136?

While a complete workaround is not available, limiting user permissions and monitoring database activities can help mitigate risks associated with CVE-2009-4136.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203