CVE-2026-14676·PostgreSQL vulnerability
Heap buffer overflow in PostgreSQL pg_stat_statements allows the query author to execute arbitrary code as the operating system user running the database, via crafted queries containing array constants. Within major version 18, minor versions before PostgreSQL 18.6 are affected. Versions before PostgreSQL 18 are unaffected.
- Severity
- high
- Software
- PostgreSQL
- Fixed in
- 18.5
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.44% — higher than 36% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2026-14676 scores 8.8 on CVSS, so a successful attack would be serious — but at 0.44%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 18.0
Until: 18.5
Fixed in: 18.5
How to fix this CVE
PostgreSQL versions 18.0 through 18.5 contain a heap buffer overflow vulnerability in the pg_stat_statements module that can be exploited through maliciously crafted array constants in SQL queries. Upgrade to PostgreSQL 18.6 or later to patch this vulnerability and eliminate the risk of arbitrary code execution with database process privileges.
sudo dnf update postgresql-server postgresql-contribDefensia detects this vulnerability
How to check if you are affected
- Run 'sudo -u postgres psql -c "SELECT version();"' to check the currently installed PostgreSQL version and confirm if it falls within the 18.0-18.5 affected range
- Verify pg_stat_statements module is loaded by executing 'sudo -u postgres psql -c "SELECT * FROM pg_extension WHERE extname = 'pg_stat_statements';"' — if the extension is installed, the server is potentially vulnerable
- Search PostgreSQL logs (typically in /var/log/postgresql/) for unusual query patterns containing array constants with exceptional sizes or malformed data that may indicate exploitation attempts
- After applying the update, re-run 'sudo -u postgres psql -c "SELECT version();"' to confirm PostgreSQL is now version 18.6 or higher
FAQ
What is CVE-2026-14676?
CVE-2026-14676 is a heap buffer overflow in PostgreSQL's pg_stat_statements extension that permits authenticated users to execute arbitrary code with the privileges of the database server process by submitting specially crafted SQL queries containing malformed array constants.
Is CVE-2026-14676 being actively exploited?
According to CISA, CVE-2026-14676 is not currently listed on the Known Exploited Vulnerabilities (KEV) catalog, and no public exploits are known to be available at this time.
What versions of PostgreSQL are affected by CVE-2026-14676?
PostgreSQL versions 18.0 through 18.5 are affected by this vulnerability. PostgreSQL 17 and earlier major versions, as well as PostgreSQL 18.6 and later, are not vulnerable.
How do I check if my server is vulnerable to CVE-2026-14676?
Execute 'sudo -u postgres psql -c "SELECT version();"' to determine your PostgreSQL version. If the output shows a version number between 18.0 and 18.5 and pg_stat_statements is enabled, your system is vulnerable.
Does Defensia detect CVE-2026-14676?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PostgreSQL is installed on a monitored server, CVE-2026-14676 will appear in your dashboard with remediation steps.
Related PostgreSQL CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-14676. Free for 1 server.
Get started free