CVEfocus › CVE database › CVE-2026-2007

CVE-2026-2007PostgreSQL pg_trgm heap buffer overflow writes pattern onto server memory

CVSS 8.2 HighEPSS 0.5% (higher than 46% of CVEs)Published 2026-02-12Updated 2026-07-15Assigner: PostgreSQL

Heap buffer overflow in PostgreSQL pg_trgm allows a database user to achieve unknown impacts via a crafted input string. The attacker has limited control over the byte patterns to be written, but we have not ruled out the viability of attacks that lead to privilege escalation. PostgreSQL 18.1 and 18.0 are affected.

CWE-120CWE-122

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

44Fixed
2Fix pending
4Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04postgresql-18Not affected
vulnerable_code_not_present
Ubuntu 25.10postgresql-17Not affected
vulnerable_code_not_present
Ubuntu 24.04postgresql-16Not affected
vulnerable_code_not_present
Ubuntu 22.04postgresql-14Not affected
vulnerable_code_not_present
Ubuntu 14.04postgresql-9.3Fix pendingUBUNTU-CVE-2026-2007
Debian 14postgresql-18Fixed18.2-1DEBIAN-CVE-2026-2007
Red Hat Enterprise Linux 10postgresql18Fixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-contribFixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-docsFixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-plperlFixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-plpython3Fixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-private-develFixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-private-libsFixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-serverFixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-server-develFixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-staticFixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-testFixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-test-rpm-macrosFixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-upgradeFixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 10postgresql18-upgrade-develFixed0:18.3-1.el10_2RHSA-2026:19009
Red Hat Enterprise Linux 9postgresql18Fix pending
Affected
AlmaLinux 10postgresql18Fixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-contribFixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-docsFixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-plperlFixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-plpython3Fixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-private-develFixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-private-libsFixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-serverFixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-server-develFixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-staticFixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-testFixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-test-rpm-macrosFixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-upgradeFixed18.3-1.el10_2ALSA-2026:19009
AlmaLinux 10postgresql18-upgrade-develFixed18.3-1.el10_2ALSA-2026:19009
Rocky Linux 10postgresql18Fixed0:18.3-1.el10RLSA-2026:19009
Alpine Linux 3.24postgresql16Fixed16.12-r0ALPINE-CVE-2026-2007
Alpine Linux 3.24postgresql17Fixed17.9-r0ALPINE-CVE-2026-2007
Alpine Linux 3.24postgresql18Fixed18.2-r0ALPINE-CVE-2026-2007
Alpine Linux 3.23postgresql16Fixed16.13-r0ALPINE-CVE-2026-2007
Alpine Linux 3.23postgresql17Fixed17.8-r0ALPINE-CVE-2026-2007
Alpine Linux 3.23postgresql18Fixed18.2-r0ALPINE-CVE-2026-2007
Alpine Linux 3.22postgresql15Fixed15.16-r0ALPINE-CVE-2026-2007
Alpine Linux 3.22postgresql16Fixed16.12-r0ALPINE-CVE-2026-2007
Alpine Linux 3.22postgresql17Fixed17.9-r0ALPINE-CVE-2026-2007
Alpine Linux 3.21postgresql15Fixed15.17-r0ALPINE-CVE-2026-2007
Alpine Linux 3.21postgresql16Fixed16.12-r0ALPINE-CVE-2026-2007
Alpine Linux 3.21postgresql17Fixed17.8-r0ALPINE-CVE-2026-2007
Alpine Linux 3.20postgresql15Fixed15.16-r0ALPINE-CVE-2026-2007
Alpine Linux 3.20postgresql16Fixed16.12-r0ALPINE-CVE-2026-2007

What the vendor says

As published in the CVE record by PostgreSQL, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.