Local Privilege Escalation Vulnerability in postgresql-common
Summary
ALPINE-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 < 0. No fix is published. 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 that facilitate the creation, management, and maintenance of PostgreSQL instances. This package is widely used in various environments where PostgreSQL is deployed, making it crucial for system administrators to ensure its security and stability. The vulnerability in question affects versions prior to 210, where the pg_ctlcluster script fails to drop privileges when creating socket and statistics temporary directories.
Vulnerability Detail
The vulnerability arises from the pg_ctlcluster script in postgresql-common, which does not adequately drop privileges when creating temporary directories for sockets and statistics. This oversight can lead to local privilege escalation, allowing unauthorized users to gain elevated access to system resources. The potential ramifications include unauthorized data access, manipulation of database instances, and overall compromise of system integrity. The vulnerability is classified with a CVSS score of 7.8, indicating a high severity level.
How To Fix
To rectify this vulnerability, it is essential to update the postgresql-common package to version 210 or later, where the issue has been addressed.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, system administrators can manually adjust the permissions of the temporary directories used by pg_ctlcluster to limit access until the package can be updated. This can be done by executing the following command: 'chmod 700 /path/to/temp/directory'. However, this is not a permanent solution and updating the package is strongly recommended.
Conclusion
In summary, the vulnerability in postgresql-common poses a significant risk of local privilege escalation due to improper privilege management in the pg_ctlcluster script. It is crucial for users to update to the latest version to mitigate this risk and ensure the security of their PostgreSQL instances.
See every vulnerability recorded for postgresql-common →
FAQ
The CVSS score of this vulnerability is 7.8, indicating a high severity level.
Versions of postgresql-common prior to 210 are affected by this vulnerability.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
The potential consequences include unauthorized access to system resources, manipulation of database instances, and compromise of system integrity.
Yes, the permanent fix is to update the postgresql-common package to version 210 or later.
References
Related vulnerabilities
Recent vulnerabilities recorded for postgresql-common.