Critical Vulnerability in PostgreSQL: Code Execution Risk for Users
Summary
ALPINE-CVE-2018-1058: A flaw was found in the way Postgresql allowed a user to modify the behavior of a query for other users. Affects postgresql versions < 10.3-r0. Fixed in 10.3-r0. 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 is a powerful, open-source relational database management system that uses and extends the SQL language. It is known for its reliability, feature robustness, and performance. However, a significant vulnerability has been identified that allows attackers with user accounts to manipulate query behaviors, potentially leading to unauthorized code execution with superuser permissions.
Vulnerability Detail
A flaw was found in PostgreSQL that permits a user to alter the behavior of a query for other users. This vulnerability, identified as CVE-2018-1058, affects versions 9.3 through 10. An attacker with a user account could exploit this flaw to execute arbitrary code with superuser privileges in the database, posing severe security risks including data breaches and unauthorized access.
How To Fix
Minimum fixed version
10.3-r0
This is the first release that contains the fix.
sudo apk add --upgrade postgresql
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, restrict user permissions and limit the ability of users to execute queries that could be manipulated. This can be done by reviewing and adjusting user roles and privileges within the PostgreSQL database.
Conclusion
The identified vulnerability in PostgreSQL poses a significant risk, allowing attackers to execute code with elevated privileges. It is crucial for users to update to the patched versions to mitigate this risk and ensure the security of their databases.
See every vulnerability recorded for postgresql →
FAQ
Versions 9.3 through 10 are affected by this vulnerability.
An attacker could execute arbitrary code with superuser privileges, leading to potential data breaches and unauthorized access.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The CVSS score of this vulnerability is 8.8, indicating a high severity level.
Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities using just a manifest file like package-lock.json.
References
Related vulnerabilities
Recent vulnerabilities recorded for postgresql.