CVE-2026-14677·PostgreSQL vulnerability
Integer wraparound in PostgreSQL 32-bit builds of pltcl and plperl allows an object creator to cause the server to undersize an allocation and write out-of-bounds via crafted function bodies. This may execute arbitrary code as the operating system user running the database. CVE-2026-6473 had fixed similar problems. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- 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.42% — higher than 35% 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-14677 scores 8.8 on CVSS, so a successful attack would be serious — but at 0.42%, 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
Upgrade PostgreSQL to version 18.6 or later to remediate an integer wraparound vulnerability affecting 32-bit builds of pltcl and plperl extensions. This flaw allows database object creators to trigger undersized memory allocations leading to out-of-bounds writes and potential arbitrary code execution. Organizations running PostgreSQL 18.0–18.5 should prioritize this update to prevent privilege escalation within the database context.
sudo dnf upgrade postgresql-server postgresql-contribDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check installed PostgreSQL version with: psql --version or sudo -u postgres psql -c 'SELECT version();'
- Step 2: Verify if pltcl or plperl extensions are installed by querying: SELECT * FROM pg_available_extensions WHERE name IN ('pltcl', 'plperl');
- Step 3: Review PostgreSQL server logs for unusual memory allocation errors or segmentation faults around user-defined function creation: sudo tail -100 /var/log/postgresql/postgresql.log | grep -i 'wraparound\|allocation\|segfault'
- Step 4: After patching, confirm the version with psql --version and verify no extension re-initialization was needed: sudo -u postgres psql -c 'SELECT extname, extversion FROM pg_extension WHERE extname IN ("pltcl", "plperl");'
FAQ
What is CVE-2026-14677?
This vulnerability is an integer wraparound bug in PostgreSQL's pltcl and plperl extension code on 32-bit systems that permits database object owners to craft malicious function bodies, causing the server to allocate insufficient memory and write beyond buffer boundaries, potentially enabling arbitrary code execution with database server privileges.
Is CVE-2026-14677 being actively exploited?
No, this vulnerability is not currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog and no public exploits have been released, but the high CVSS score of 8.8 and the requirement for only low-privilege database user access make it a significant risk.
What versions of PostgreSQL are affected by CVE-2026-14677?
PostgreSQL versions 18.0 through 18.5, as well as earlier branch versions (17.0–17.10, 16.0–16.14, 15.0–15.18, and 14.0–14.23) are affected; upgrade to 18.6, 17.11, 16.15, 15.19, or 14.24 respectively to remediate.
How do I check if my server is vulnerable to CVE-2026-14677?
Run 'psql --version' and check if your version falls within the vulnerable range (18.0–18.5 for the latest branch); additionally, confirm your PostgreSQL build is 32-bit via 'sudo -u postgres psql -c "SELECT version();"' and inspect for 'x86' or 'i686' in the output.
Does Defensia detect CVE-2026-14677?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PostgreSQL is installed on a monitored server, CVE-2026-14677 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-14677. Free for 1 server.
Get started free