CVE-2026-2007
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedHeap 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · moderate confidenceHeap buffer overflow vulnerability in PostgreSQL's pg_trgm (trigram) extension allows authenticated database users to overflow heap memory via specially crafted input strings to trigram-related functions. While the attacker has limited control over the bytes written, the severity and potential for privilege escalation warrants serious concern.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data>= 18.0, < 18.2CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- Low
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check your PostgreSQL server versionRun 'SELECT version();' or 'psql -c "SELECT version();"' to obtain the installed PostgreSQL version number.Affected if The version is 18.0 or 18.1 (any version >= 18.0 but < 18.2)
-
Verify pg_trgm extension availabilityQuery the pg_available_extensions system catalog: 'SELECT name, default_version FROM pg_available_extensions WHERE name = 'pg_trgm';'Affected if The extension shows as available (this means the vulnerability is potentially accessible)
-
Check if pg_trgm is enabled in any databaseRun 'SELECT datname, extname FROM pg_extension e JOIN pg_database d ON e.extdbid = d.oid WHERE extname = 'pg_trgm';' to list databases with the extension installed.Affected if The extension is installed in one or more databases - the vulnerable code path is present
-
Identify users with pg_trgm function accessQuery 'SELECT routine_name, routine_schema FROM information_schema.routines WHERE routine_name LIKE 'similarity%' OR routine_name LIKE '%trgm%';' to see trigram functions, then check grants with '\df' in psql or query pg_proc and pg_roles.Affected if Any authenticated user (especially untrusted ones) has execute permission on pg_trgm functions like similarity(), show_trgm(), etc.
You are affected if your PostgreSQL version is 18.0 or 18.1 AND the pg_trgm extension is installed and accessible to database users.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped18.2
Upgrade PostgreSQL to a version beyond 18.1 that contains the security patch for this vulnerability. If immediate upgrade is not feasible, disable or restrict access to the pg_trgm extension until the patch can be applied.
PostgreSQL 18.2 or later
- 1. Identify current PostgreSQL version by running: psql --version or SELECT version();
- 2. Schedule a maintenance window for the upgrade
- 3. Create a full backup of all databases using pg_dump or pg_basebackup
- 4. Upgrade PostgreSQL to version 18.2 or later. On most systems: yum update postgresql or apt-get install postgresql-18 (or appropriate package manager)
- 5. After upgrade, restart the PostgreSQL service: systemctl restart postgresql
- 6. Verify the new version is running: psql --version
- 7. Run pg_dumpall to verify all databases are accessible post-upgrade
- 8. Test critical application functionality to ensure normal operations
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation6.0 h
- Implementation12.0 h
- Testing10.0 h
- Review / QA6.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $9,504.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-2007 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-2007 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data