---
id: CVE-2026-2007
title: >-
  Heap buffer overflow in PostgreSQL pg_trgm allows a database user to achieve
  unknown impacts via a crafted input string
summary: >-
  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 a…
severity: high
cvss: 8.2
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H'
cwe:
  - CWE-122
  - CWE-120
vendor: postgresql
product: postgresql
affected:
  - 'postgresql >= 18.0, < 18.2'
patched:
  - postgresql 18.2
published: '2026-02-12'
updated: '2026-06-30'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-2007'
references:
  - url: 'https://www.postgresql.org/support/security/CVE-2026-2007/'
    label: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
  - url: 'https://access.redhat.com/errata/RHSA-2026:19009'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://access.redhat.com/errata/RHSA-2026:8756'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://access.redhat.com/security/cve/CVE-2026-2007'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2439320'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-2007.json
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
tags:
  - nvd
epss: 0.00499
epssPercentile: 0.41667
ingestedAt: '2026-07-03T18:53:52.419Z'
---

## Overview

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.

## Affected

- `postgresql >= 18.0, < 18.2`

## Remediation

Upgrade past the affected range:

- `postgresql 18.2`
