CVE-2026-14662·PostgreSQL vulnerability
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. Hence, application users attacking the database, through the application as a conduit, are unlikely. 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.46% — higher than 38% 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-14662 scores 8.8 on CVSS, so a successful attack would be serious — but at 0.46%, 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 patch an integer wraparound vulnerability in tsvector and tsquery functions that can lead to out-of-bounds memory writes. Organizations running PostgreSQL 18.0–18.5 should prioritize this update, as an authenticated database user with crafted input could potentially execute arbitrary code with database server privileges. Review your application's use of full-text search features and validate input handling after patching.
sudo dnf update postgresql-server postgresql-libs postgresql-develDefensia detects this vulnerability
How to check if you are affected
- Run `psql --version` or query `SELECT version();` within psql to confirm the installed PostgreSQL version; versions 18.0–18.5 are vulnerable
- Check if tsvector or tsquery data types are used in your database schema with `SELECT * FROM pg_type WHERE typname IN ('tsvector', 'tsquery');`
- Review PostgreSQL server logs (typically in `/var/log/postgresql/` on Linux) for error messages containing 'out of memory', 'allocation failure', or segmentation faults occurring after the vulnerability window
- After upgrade, confirm the patched version is active by running `SELECT version();` and verify the patch level is 18.6 or higher
FAQ
What is CVE-2026-14662?
CVE-2026-14662 is an integer wraparound flaw in PostgreSQL's full-text search functions (tsvector and tsquery) that allows authenticated database users to trigger undersized memory allocations and write beyond buffer boundaries, potentially enabling arbitrary code execution under the database process's operating system privileges.
Is CVE-2026-14662 being actively exploited?
No, this vulnerability is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are currently available, though the high CVSS score (8.8) and code-execution risk warrant prompt patching.
What versions of PostgreSQL are affected by CVE-2026-14662?
PostgreSQL versions 18.0 through 18.5 are vulnerable; versions 18.6, 17.11, 16.15, 15.19, and 14.24 or later have been patched.
How do I check if my server is vulnerable to CVE-2026-14662?
Connect to your PostgreSQL instance and run `SELECT version();`—if the version is 18.0–18.5, your server is vulnerable and requires immediate patching.
Does Defensia detect CVE-2026-14662?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PostgreSQL is installed on a monitored server, CVE-2026-14662 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-14662. Free for 1 server.
Get started free