Local Privilege Escalation Vulnerability in PostgreSQL-Common Package
Summary
DEBIAN-CVE-2019-3466: The pg_ctlcluster script in postgresql-common in versions prior to 210 didn't drop privileges when creating socket/statistics temporary directories, which could result in local privilege escalation. Affects postgresql-common versions < 210. Fixed in 210. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
PostgreSQL-Common is a package that provides common utilities for managing PostgreSQL database clusters. It includes scripts and tools to facilitate the creation, management, and control of PostgreSQL instances. This package is essential for users who deploy PostgreSQL databases, as it simplifies various administrative tasks. However, a vulnerability exists in versions prior to 210, which affects the security of the system when creating socket and statistics temporary directories.
Vulnerability Detail
The pg_ctlcluster script in postgresql-common versions prior to 210 does not drop privileges when creating socket and statistics temporary directories. This oversight can lead to local privilege escalation, allowing an unprivileged user to gain elevated permissions on the system. The vulnerability originates from inadequate privilege management in the script, which could potentially allow attackers to manipulate sensitive system resources.
How To Fix
Minimum fixed version
210
This is the first release that contains the fix.
sudo apt-get install --only-upgrade postgresql-common
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can manually adjust the permissions of the directories created by the pg_ctlcluster script to restrict access. However, this is not a permanent solution and updating the package is strongly recommended.
Conclusion
The vulnerability in the postgresql-common package poses a significant risk of local privilege escalation due to inadequate privilege management in the pg_ctlcluster script. Users are advised to update to version 210 or later to mitigate this risk. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for postgresql-common →
FAQ
The vulnerability can lead to local privilege escalation, allowing unprivileged users to gain elevated permissions on the system.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
All versions of postgresql-common prior to version 210 are affected by this vulnerability.
Yes, a patch is available in version 210 and later of the postgresql-common package.
If immediate updates are not possible, consider implementing temporary permission adjustments as a workaround, but prioritize updating the package as soon as feasible.
References
Related vulnerabilities
Recent vulnerabilities recorded for postgresql-common.