VulnarioBlogPostgreSQL vulnerabilities
PostgreSQL Vulnerabilities: The 10 Most Critical PostgreSQL Security Bugs (CVEs)
PostgreSQL vulnerabilities are security flaws in PostgreSQL that attackers can abuse to steal data, take over a server or interrupt a service. PostgreSQL is a powerful open-source object-relational database. The National Vulnerability Database (NVD) lists 203 CVEs for PostgreSQL, 7 of them rated critical, and 44 were published in the last 12 months. None of them is currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog for the product entries we checked.
This guide lists the 10 most critical PostgreSQL security bugs, with the CVE number, CVSS score, affected versions and what to do about each one. It also covers PostgreSQL security basics, the current end-of-life dates and a free way to be told about the next PostgreSQL CVE as soon as it is published.
Key takeaways
- No PostgreSQL CVE is currently in CISA's KEV catalog for the entries we checked, but critical flaws still get exploited quickly once details are public.
- 7 PostgreSQL CVEs are rated critical (CVSS v3), and 44 new ones were published in the last 12 months.
- The newest CVE in this guide is CVE-2026-14662, published Aug 13, 2026.
- Supported PostgreSQL releases today (per endoflife.date): 18, 17, 16, 15, 14. Releases not on the list are past their announced end of life.
- You can monitor PostgreSQL for free. Vulnario emails you when a new CVE matches your version and the rest of your stack.
How we ranked these PostgreSQL CVEs
We ranked CVEs first by whether CISA lists them as exploited, then by CVSS score (v3 scores before the older v2 scale, which is marked when used), then by publication date (newest first). When a technology has several product entries in NVD, we combined them and removed duplicates. This favors the bugs that matter most in practice, so the guide is a list of the most critical flaws we found, not a complete history.
Every CVE number, score, date and affected version below comes from the NVD record and the CISA KEV catalog, checked on Nov 3, 2026. Scores can change when NVD reanalyzes a record, so open the linked record if you need the current value.
The 10 most critical PostgreSQL CVEs at a glance
| # | CVE | CVSS | Published | Type | CISA KEV |
|---|---|---|---|---|---|
| 1 | CVE-2015-0244 | 9.8 Critical | 2020-01-27 | SQL injection | No |
| 2 | CVE-2015-3166 | 9.8 Critical | 2019-11-20 | Memory buffer overflow | No |
| 3 | CVE-2019-10211 | 9.8 Critical | 2019-10-29 | Code injection | No |
| 4 | CVE-2018-16850 | 9.8 Critical | 2018-11-13 | SQL injection | No |
| 5 | CVE-2017-7546 | 9.8 Critical | 2017-08-16 | Improper authentication | No |
| 6 | CVE-2018-1115 | 9.1 Critical | 2018-05-10 | Critical security flaw | No |
| 7 | CVE-2016-3065 | 9.1 Critical | 2016-04-11 | Permissions and privileges | No |
| 8 | CVE-2026-14662 | 8.8 High | 2026-08-13 | Integer overflow | No |
| 9 | CVE-2026-14664 | 8.8 High | 2026-08-13 | Heap buffer overflow | No |
| 10 | CVE-2026-14669 | 8.8 High | 2026-08-13 | Heap buffer overflow | No |
Each PostgreSQL CVE explained
1. CVE-2015-0244: SQL injection
- What NVD says
- PostgreSQL before 9.0.19, 9.1.x before 9.1.15, 9.2.x before 9.2.10, 9.3.x before 9.3.6, and 9.4.x before 9.4.1 does not properly handle errors while reading a protocol message, which allows remote attackers to conduct SQL injection attacks via crafted binary data in a parameter and causing an error, which triggers the loss of synchronization and part of the protocol message to be treated as a new message, as…
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- before 9.0.19; 9.1.0 to before 9.1.15; 9.2.0 to before 9.2.10; 9.3.0 to before 9.3.6
- What to do
- Upgrade to the fixed release for your branch (9.0.19, 9.1.15, 9.2.10) or a later one, then restart the service.
- Advisory
- Vendor advisory or patch (opens in a new tab)
2. CVE-2015-3166: Memory buffer overflow
- What NVD says
- The snprintf implementation in PostgreSQL before 9.0.20, 9.1.x before 9.1.16, 9.2.x before 9.2.11, 9.3.x before 9.3.7, and 9.4.x before 9.4.2 does not properly handle system-call errors, which allows attackers to obtain sensitive information or have other unspecified impact via unknown vectors, as demonstrated by an out-of-memory error.
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- before 9.0.20; 9.1 to before 9.1.16; 9.2 to before 9.2.11; 9.3 to before 9.3.7
- What to do
- Upgrade to the fixed release for your branch (9.0.20, 9.1.16, 9.2.11) or a later one, then restart the service.
- Advisory
- Vendor advisory or patch (opens in a new tab)
3. CVE-2019-10211: Code injection
- What NVD says
- Postgresql Windows installer before versions 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24 is vulnerable via bundled OpenSSL executing code from unprotected directory.
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- before 9.4.24; 9.5.0 to before 9.5.19; 9.6.0 to before 9.6.15; 10.0 to before 10.10
- What to do
- Upgrade to the fixed release for your branch (9.4.24, 9.5.19, 9.6.15) or a later one, then restart the service.
- Advisory
- Vendor advisory or patch (opens in a new tab)
4. CVE-2018-16850: SQL injection
- What NVD says
- postgresql before versions 11.1, 10.6 is vulnerable to a to SQL injection in pg_upgrade and pg_dump via CREATE TRIGGER ... REFERENCING. Using a purpose-crafted trigger definition, an attacker can cause arbitrary SQL statements to run, with superuser privileges.
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 10.0 to before 10.6; 11.0 to before 11.1
- What to do
- Upgrade to the fixed release for your branch (10.6, 11.1) or a later one, then restart the service.
- Advisory
- Vendor advisory or patch (opens in a new tab)
5. CVE-2017-7546: Improper authentication
- What NVD says
- PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allowing remote attackers to gain access to database accounts with an empty password.
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 9.2; 9.2.1; 9.2.2; 9.2.3
- What to do
- Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).
6. CVE-2018-1115: Critical security flaw
- What NVD says
- postgresql before versions 10.4, 9.6.9 is vulnerable in the adminpack extension, the pg_catalog.pg_logfile_rotate() function doesn't follow the same ACLs than pg_rorate_logfile. If the adminpack is added to a database, an attacker able to connect to it could exploit this to force log rotation.
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on integrity and availability.
- Affected versions
- before 9.6.9; 10.0 to before 10.4
- What to do
- Upgrade to the fixed release for your branch (9.6.9, 10.4) or a later one, then restart the service.
- Advisory
- Vendor advisory or patch (opens in a new tab)
7. CVE-2016-3065: Permissions and privileges
- What NVD says
- The (1) brin_page_type and (2) brin_metapage_info functions in the pageinspect extension in PostgreSQL before 9.5.x before 9.5.2 allows attackers to bypass intended access restrictions and consequently obtain sensitive server memory information or cause a denial of service (server crash) via a crafted bytea value in a BRIN index page.
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality and availability.
- Affected versions
- 9.5; 9.5.1
- What to do
- Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).
8. CVE-2026-14662: Integer overflow
- What NVD says
- Integer wraparound in PostgreSQL tsvector and tsquery data type functions allows an unprivileged database user to cause the server to undersize an allocation and write out-of-bounds, via crafted large inputs. This may execute arbitrary code as the operating system user running the database. These types are typically sourced from application logic, not taken from the application's user.
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 14.0 to before 14.24; 15.0 to before 15.19; 16.0 to before 16.15; 17.0 to before 17.11
- What to do
- Upgrade to the fixed release for your branch (14.24, 15.19, 16.15) or a later one, then restart the service.
- Advisory
- Vendor advisory or patch (opens in a new tab)
9. CVE-2026-14664: Heap buffer overflow
- What NVD says
- Heap buffer overflow in PostgreSQL regexp allows the query author to execute arbitrary code as the operating system user running the database, via text that would not pass encoding validation. This shares heritage with CVE-2026-2006, but this case involved unanticipated data growth when round-tripped through pg_wchar. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 14.0 to before 14.24; 15.0 to before 15.19; 16.0 to before 16.15; 17.0 to before 17.11
- What to do
- Upgrade to the fixed release for your branch (14.24, 15.19, 16.15) or a later one, then restart the service.
- Advisory
- Vendor advisory or patch (opens in a new tab)
10. CVE-2026-14669: Heap buffer overflow
- What NVD says
- Heap buffer overflow in PostgreSQL to_char(timestamptz) allows the party choosing the timezone to execute arbitrary code as the operating system user running the database, via a long POSIX timezone abbreviation. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 14.0 to before 14.24; 15.0 to before 15.19; 16.0 to before 16.15; 17.0 to before 17.11
- What to do
- Upgrade to the fixed release for your branch (14.24, 15.19, 16.15) or a later one, then restart the service.
- Advisory
- Vendor advisory or patch (opens in a new tab)
PostgreSQL end of life: which versions still get security fixes
Running a release that still receives security fixes is the most effective way to avoid PostgreSQL vulnerabilities. After a release reaches end of life, newly published CVEs stay unpatched. As of Nov 3, 2026 the supported PostgreSQL releases are 18, 17, 16, 15, 14.
| Release | Released | End of life | Latest | Status |
|---|---|---|---|---|
| PostgreSQL 18 | Sep 25, 2025 | Nov 14, 2030 | 18.6 | Supported |
| PostgreSQL 17 | Sep 26, 2024 | Nov 8, 2029 | 17.11 | Supported |
| PostgreSQL 16 | Sep 14, 2023 | Nov 9, 2028 | 16.15 | Supported |
| PostgreSQL 15 | Oct 13, 2022 | Nov 11, 2027 | 15.19 | Supported |
| PostgreSQL 14 | Sep 30, 2021 | Nov 12, 2026 | 14.24 | Supported |
| PostgreSQL 13 | Sep 24, 2020 | Nov 13, 2025 | 13.23 | End of life |
| PostgreSQL 12 | Oct 3, 2019 | Nov 21, 2024 | 12.22 | End of life |
| PostgreSQL 11 | Oct 18, 2018 | Nov 9, 2023 | 11.22 | End of life |
Dates come from endoflife.date (opens in a new tab), which tracks each project's own support policy. Confirm them with the vendor before planning an upgrade.
How to check if your PostgreSQL is vulnerable
Find the exact version first, then compare it with the affected and fixed versions in each CVE above.
psql --version
On Linux, Debian, Ubuntu and RHEL-based distributions often backport security fixes and keep the old version number, so a package that looks old can already be patched. Check your distribution's own security tracker or the package changelog before concluding that a server is exposed.
PostgreSQL security checklist
- Never expose the database port to the internet; allow only the application servers.
- Use strong, unique credentials and least-privilege accounts for each application.
- Apply minor and security releases on a regular cadence, after testing.
- Encrypt connections with TLS and encrypt backups.
- Restrict or remove admin tools you do not need.
- Test restoring from backup, not only creating backups.
Where you run PostgreSQL matters as much as how you patch it. Whether your site lives on a VPS, a dedicated server or shared hosting (opens in a new tab), check who is responsible for updating PostgreSQL: on most plans the operating system and applications are yours to patch unless the plan says otherwise.
Your stack is bigger than PostgreSQL. A flaw anywhere in the chain can be the way in, so also review our guides to MySQL vulnerabilities, Django vulnerabilities and Rails vulnerabilities.
How to get alerted about new PostgreSQL vulnerabilities
NVD received 44 new PostgreSQL CVEs in the last twelve months, and critical ones can be exploited within days. Reading advisories by hand is easy to forget, so most teams automate it. You have three practical options:
- Follow the vendor's announcements and your distribution's security list. They are accurate but cover only one product and you read them manually.
- Query the NVD feed yourself. It is complete and needs scripting, filtering and a mail or chat integration to maintain.
- Use a stack-based alert service. You pick your technologies once and receive an email when a matching CVE appears.
Vulnario is the third option, and it is free to start. It scans the National Vulnerability Database, the CISA KEV catalog and GitHub Security Advisories every hour. You choose PostgreSQL and the rest of your stack, confirm your email with a code, and the alerts begin. Each email includes the CVE number, the CVSS score, a marker when CISA lists the flaw as actively exploited, the attack vector, a patch or advisory link and a suggested time frame to fix it.
- Free: all technologies, alerts grouped at most every 12 hours.
- Pro ($29/month): alerts are sent on the next hourly scan, so you hear about a new CVE up to 12 hours earlier.
Related security guides
Few stacks run PostgreSQL alone. These guides cover the technologies it is most often deployed with.
- MySQL vulnerabilities: MySQL is the world's most widely used open-source relational database.
- Django vulnerabilities: Django is a high-level Python web framework.
- Rails vulnerabilities: Ruby on Rails is a full-stack web framework written in Ruby.
- Docker vulnerabilities: Docker is the standard tool for building and running containers.
- Ruby vulnerabilities: Ruby is the programming language behind Ruby on Rails.
- Moodle vulnerabilities: Moodle is the world's most widely used open-source learning management system.
- Odoo vulnerabilities: Odoo is an open-source business application suite (ERP, CRM, e-commerce).
- Mattermost vulnerabilities: Mattermost is an open-source team messaging platform, an alternative to Slack.
- n8n vulnerabilities: n8n is a workflow automation platform that can be self-hosted.
- Apache Airflow vulnerabilities: Apache Airflow is a platform for scheduling and monitoring data workflows.
Frequently asked questions about PostgreSQL vulnerabilities
What are the most critical PostgreSQL vulnerabilities?
Based on NVD scores and CISA's exploited-vulnerability catalog, the most critical PostgreSQL CVEs include CVE-2015-0244 (CVSS 9.8), CVE-2015-3166 (CVSS 9.8), CVE-2019-10211 (CVSS 9.8). The guide above ranks the 10 most critical with affected versions and fixes.
Have PostgreSQL vulnerabilities been exploited in real attacks?
For the PostgreSQL product entries we checked, none of the CVEs is currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog. A CVE can still be exploited before it is added, so keep PostgreSQL patched.
How many vulnerabilities does PostgreSQL have?
As of Nov 3, 2026 the National Vulnerability Database lists 203 CVEs for PostgreSQL, with 7 rated critical by CVSS v3. 44 were published in the previous twelve months.
Which PostgreSQL versions are still supported?
As of Nov 3, 2026, endoflife.date lists these PostgreSQL releases as supported: 18, 17, 16, 15, 14. Releases that are not listed are past their announced end of life.
How do I check which PostgreSQL version I run?
Run psql --version on the server and compare the result with the fixed versions in each CVE. On Debian, Ubuntu and RHEL-based systems, fixes are often backported without changing the version number, so also check your distribution's security tracker.
How can I get alerted when a new PostgreSQL CVE is published?
Add PostgreSQL to a service that watches the National Vulnerability Database, CISA KEV and GitHub Security Advisories. Vulnario does this for free: choose PostgreSQL and the rest of your stack, verify your email, and you receive an alert when a new CVE matches. Free alerts are grouped at most every 12 hours, and Pro sends them on the next hourly scan.
Is PostgreSQL secure?
PostgreSQL is as secure as its patch level. NVD published 44 new PostgreSQL CVEs in the last twelve months, so running a current, supported release and applying security updates promptly is the most effective protection.
What is CVE-2015-0244?
CVE-2015-0244 is a critical PostgreSQL vulnerability with a CVSS score of 9.8, published Jan 27, 2020. PostgreSQL before 9.0.19, 9.1.x before 9.1.15, 9.2.x before 9.2.10, 9.3.x before 9.3.6, and 9.4.x before 9.4.1 does not properly handle errors while reading a protocol message, which allows remote attackers to conduct SQL injection attacks via crafted binary data in a parameter and causing an…
Sources
- National Vulnerability Database (NVD) (opens in a new tab), CVE records, CVSS scores and CPE counts, checked Nov 3, 2026.
- CISA Known Exploited Vulnerabilities (KEV) catalog (opens in a new tab), checked Nov 3, 2026.
- endoflife.date: PostgreSQL (opens in a new tab), release and support dates, checked Nov 3, 2026.
This article is informational and not a substitute for your own risk assessment. CVSS scores and affected versions may change when NVD updates a record.