OS Command Injection in PostgreSQL - CVE-2007-6601
Published: June 23, 2025
Vulnerability identifier: #VU111762
CSH Severity: Medium
CVSS v4: 9.1 [CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2007-6601
CWE-ID: CWE-78
Exploitation vector: Remote access
Exploit availability:
No public exploit available
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary shell commands on the target system.
The vulnerability exists due to improper input validation in dblink. A remote attacker with ability to manipulate the connection string can pass specially crafted input to the application and execute arbitrary OS commands on the target system.Note, the vulnerability exists due to incomplete fix for CVE-2007-3278.
Affected software
PostgreSQL
Gentoo Linux
Ubuntu
postgresql-pltcl-8.1 (Ubuntu package)
postgresql-8.1 (Ubuntu package)
postgresql-8.2 (Ubuntu package)
postgresql-pltcl-8.2 (Ubuntu package)
dev-db/postgresql
Gentoo Linux
Ubuntu
postgresql-pltcl-8.1 (Ubuntu package)
postgresql-8.1 (Ubuntu package)
postgresql-8.2 (Ubuntu package)
postgresql-pltcl-8.2 (Ubuntu package)
dev-db/postgresql
How to mitigate CVE-2007-6601
Install updates from vendor's website.
PostgreSQL - addressed in versions 7.4.19, 8.0.15, 8.1.11, 8.2.6
postgresql-pltcl-8.1 (Ubuntu package) - addressed in versions 8.1.11-0ubuntu0.6.06.1, 8.1.11-0ubuntu0.6.10.1
postgresql-8.1 (Ubuntu package) - addressed in versions 8.1.11-0ubuntu0.6.06.1, 8.1.11-0ubuntu0.6.10.1
postgresql-8.2 (Ubuntu package) - addressed in versions 8.2.6-0ubuntu0.7.04.1, 8.2.6-0ubuntu0.7.10.1
postgresql-pltcl-8.2 (Ubuntu package) - addressed in versions 8.2.6-0ubuntu0.7.04.1, 8.2.6-0ubuntu0.7.10.1
dev-db/postgresql - update to 8.0.15
postgresql-pltcl-8.1 (Ubuntu package) - addressed in versions 8.1.11-0ubuntu0.6.06.1, 8.1.11-0ubuntu0.6.10.1
postgresql-8.1 (Ubuntu package) - addressed in versions 8.1.11-0ubuntu0.6.06.1, 8.1.11-0ubuntu0.6.10.1
postgresql-8.2 (Ubuntu package) - addressed in versions 8.2.6-0ubuntu0.7.04.1, 8.2.6-0ubuntu0.7.10.1
postgresql-pltcl-8.2 (Ubuntu package) - addressed in versions 8.2.6-0ubuntu0.7.04.1, 8.2.6-0ubuntu0.7.10.1
dev-db/postgresql - update to 8.0.15