Stack-Based Buffer Overflow in PostgreSQL: CVE-2019-10164
Summary
ALPINE-CVE-2019-10164: PostgreSQL versions 10.x before 10.9 and versions 11.x before 11.4 are vulnerable to a stack-based buffer overflow. Affects postgresql versions < 11.4-r0. Fixed in 11.4-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 object-relational database system that uses and extends the SQL language. It is known for its reliability, feature robustness, and performance. However, certain versions of PostgreSQL are vulnerable to a stack-based buffer overflow, which can be exploited by authenticated users to execute arbitrary code.
Vulnerability Detail
The vulnerability identified as CVE-2019-10164 affects PostgreSQL versions 10.x prior to 10.9 and 11.x prior to 11.4. It arises from a flaw in the way PostgreSQL handles password changes. An authenticated user can exploit this vulnerability by setting their password to a specially crafted value, leading to a stack-based buffer overflow. This can allow the attacker to execute arbitrary code with the privileges of the PostgreSQL operating system account, potentially compromising the entire database system.
How To Fix
Minimum fixed version
11.4-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, limit access to the PostgreSQL database to trusted users only, and monitor password change activities closely until the patch is applied.
Conclusion
CVE-2019-10164 is a critical vulnerability in PostgreSQL that allows authenticated users to exploit a stack-based buffer overflow. It is crucial to update to the patched versions to safeguard your database from potential attacks. Monitoring and limiting access can serve as temporary measures until the update is applied.
See every vulnerability recorded for postgresql →
FAQ
PostgreSQL versions 10.x before 10.9 and 11.x before 11.4 are affected.
The CVSS score of this vulnerability is 8.8, indicating a high severity level.
You can use Vulert's playground at Vulert Scanner to check if your application is affected without any signup.
Exploiting this vulnerability can allow an attacker to execute arbitrary code, potentially compromising the entire database system.
Yes, you can limit access to the PostgreSQL database to trusted users and monitor password change activities closely.
References
Related vulnerabilities
Recent vulnerabilities recorded for postgresql.