
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-2007 is a heap-based buffer overflow vulnerability in the PostgreSQL pg_trgm extension that allows a database user to trigger out-of-bounds memory writes via a crafted input string. The vulnerability affects PostgreSQL versions 18.0 and 18.1; version 18.2 and later are not affected. It was disclosed on February 12, 2026, and carries a CVSS v3.1 base score of 8.2 (High) (Red Hat Bugzilla, PostgreSQL Advisory).
The root cause is a heap-based buffer overflow (CWE-122) combined with a classic buffer copy without size checking (CWE-120) in the pg_trgm extension's input string processing logic. An authenticated database user can submit a specially crafted string to the pg_trgm functions, causing the server to write beyond the bounds of an allocated heap buffer. While the attacker has limited control over the specific byte patterns written, the PostgreSQL project has not ruled out privilege escalation as a potential outcome. A fix commit is available in the PostgreSQL git repository (PostgreSQL Git, Red Hat Bugzilla).
Successful exploitation can result in denial of service through application crashes, potential data integrity corruption due to uncontrolled heap memory writes, and — though not confirmed — possible privilege escalation within the database server. The impact is limited to systems running PostgreSQL 18.0 or 18.1 with the pg_trgm extension loaded, and exploitation requires at minimum a valid database user account. Confidentiality impact is assessed as none, while integrity and availability impacts are rated low and high, respectively (Red Hat Bugzilla, PostgreSQL Advisory).
No public proof-of-concept exploit code is known to exist, and there is no evidence of in-the-wild exploitation at this time. The EPSS score is approximately 0.04%, reflecting a low near-term exploitation probability. The vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires an authenticated database user account, which somewhat limits the attack surface (Red Hat Bugzilla).
pg_trgm extension enabled (e.g., via credential theft, brute force, or a low-privilege account).SELECT * FROM pg_extension WHERE extname = 'pg_trgm'; to confirm the extension is installed.pg_trgm processing functions such as similarity(), show_trgm(), or related operators.SELECT similarity('crafted_payload', 'test');, causing the server to write beyond the allocated heap buffer.FATAL/PANIC messages originating from pg_trgm-related functions; repeated errors referencing memory access violations or segmentation faults in postgresql.log.pg_trgm functions such as similarity(), show_trgm(), or the % operator.pg_trgm functions; queries with abnormally large input strings to similarity or trigram operators from unexpected users or application accounts.Upgrade PostgreSQL to version 18.2 or later, which contains the fix for this vulnerability (PostgreSQL Release). Red Hat Enterprise Linux 10 users should apply errata RHSA-2026:19009 (Red Hat Errata). IBM Observability with Instana (OnPrem) users should refer to IBM's advisory for updated package versions (IBM Advisory). As a temporary workaround where patching is not immediately possible, disable the pg_trgm extension (DROP EXTENSION pg_trgm;) if it is not required, and restrict database access to trusted users only.
Security Online Info covered the vulnerability as part of a broader report on PostgreSQL fixing five security flaws, noting the potential for critical code execution risks (Security Online). The vulnerability received standard coverage from vulnerability tracking platforms and Linux distribution security channels, with no notable controversy or exceptional researcher commentary identified.
Fix availability across major Linux distributions and their releases.
bionic (esm-infra)
postgresql-10
devel
postgresql-18
focal (esm-infra)
postgresql-12
jammy
postgresql-14
noble
postgresql-16
questing
postgresql-17
resolute
postgresql-18
trusty (esm-infra-legacy)
postgresql-9.3
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."