Description
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.
Published: 2026-02-12
Score: 8.2 High
EPSS: < 1% Very Low
KEV: No
Impact: Potential privilege escalation
Action: Assess Impact
AI Analysis

Impact

Heap buffer overflow in the PostgreSQL pg_trgm module enables an attacker with database access to write crafted byte patterns to heap memory. The vulnerability is triggered by a malformed input string and may result in memory corruption or code execution, potentially allowing privilege escalation. It is a classic buffer overflow weakness categorized as CWE-120 and CWE-122.

Affected Systems

The affected product is PostgreSQL, versions 18.0 and 18.1. No other versions are reported as vulnerable.

Risk and Exploitability

The CVSS score of 8.2 signifies high severity. The EPSS score is reported as less than 1 %, indicating a very low but non-zero probability of exploitation at present. The vulnerability is not listed in the CISA KEV catalog. The attack vector is inferred to be a remote attacker who can send a crafted SQL query to a PostgreSQL server that has the pg_trgm module enabled and whose user has sufficient privileges to invoke the vulnerable function. Attackers would need to construct a specific input pattern to trigger the overflow; however, the limited control over byte patterns does not rule out the feasibility of privilege escalation attacks.

Generated by OpenCVE AI on April 17, 2026 at 20:04 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Check for an official patch or upgrade to a later PostgreSQL release that resolves the pg_trgm buffer overflow issue.
  • If a patch is not yet available, disable the pg_trgm extension or restrict its usage to trusted users or applications.
  • Limit database user privileges to the minimum necessary and ensure the database is not exposed to untrusted networks.

Generated by OpenCVE AI on April 17, 2026 at 20:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 20 Feb 2026 20:00:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*

Fri, 13 Feb 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Postgresql
Postgresql postgresql
Vendors & Products Postgresql
Postgresql postgresql

Fri, 13 Feb 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-120
References
Metrics threat_severity

None

threat_severity

Important


Thu, 12 Feb 2026 15:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 12 Feb 2026 13:30:00 +0000

Type Values Removed Values Added
Description 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.
Title PostgreSQL pg_trgm heap buffer overflow writes pattern onto server memory
Weaknesses CWE-122
References
Metrics cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H'}


Subscriptions

Postgresql Postgresql
cve-icon MITRE

Status: PUBLISHED

Assigner: PostgreSQL

Published:

Updated: 2026-02-12T14:18:19.886Z

Reserved: 2026-02-05T18:17:56.928Z

Link: CVE-2026-2007

cve-icon Vulnrichment

Updated: 2026-02-12T14:18:13.856Z

cve-icon NVD

Status : Analyzed

Published: 2026-02-12T14:16:02.600

Modified: 2026-02-20T19:54:44.440

Link: CVE-2026-2007

cve-icon Redhat

Severity : Important

Publid Date: 2026-02-12T13:00:11Z

Links: CVE-2026-2007 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-04-17T20:15:26Z

Weaknesses