high CVSS 8.8 EPSS 0.46%

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-devel

Defensia detects this vulnerability

How to check if you are affected

  1. Run `psql --version` or query `SELECT version();` within psql to confirm the installed PostgreSQL version; versions 18.0–18.5 are vulnerable
  2. Check if tsvector or tsquery data types are used in your database schema with `SELECT * FROM pg_type WHERE typname IN ('tsvector', 'tsquery');`
  3. 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
  4. 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

CVE-2026-15742CVSS 8.8Integer wraparound in PostgreSQL fuzzystrmatch allows a user to direct writes to a huge range of addresses, executing arbitrary code as the operating system user running the database, via extreme inputs to SQL function levenshtein() or levenshtein_less_equal(). Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
CVE-2026-14670CVSS 8.8Heap buffer overflow in PostgreSQL plperl return of a tied hash allows the function owner to execute arbitrary code as the operating system user running the database, via a crafted function body. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
CVE-2026-14669CVSS 8.8Heap 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.
CVE-2026-14671CVSS 8.8Type confusion in PostgreSQL module "refint" allows an object creator to execute arbitrary code as the operating system user running the database. The fix for this emerged as a non-security bug report, and the fix appear in the git repository with subject "refint: Remove plan cache.", without a CVE number. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
CVE-2026-14664CVSS 8.8Heap 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.

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