Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-privileged database user
-
DeliveryInsert or index vector with mismatched dimensions
-
ExploitTrigger out-of-bounds write via missing dimension check
-
ExecutionCorrupt PostgreSQL backend memory
-
ImpactExecute arbitrary code as server process
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated database user (PR:L) with privileges to create/build a pgvector index or insert into one on a vector column, on an instance running pgvector before 0.8.7 with the extension installed. The specific trigger is supplying a vector whose dimensionality does not match the index's expected dimensions; the vulnerable versions lack the HnswCheckDim validation on the insert/build/scan paths, so the mismatched input reaches the out-of-bounds write. Limiting factors: valid database credentials and the pgvector extension are mandatory, there is no unauthenticated path, and SSVC rates it non-automatable - making multi-tenant/shared-database deployments where untrusted users hold table or index privileges the realistic risk surface. Note the description/source discrepancy over IVFFlat vs. HNSW affects which exact index operation triggers it. |
| Impact | This is a genuine high-priority issue for environments running pgvector, though not an emergency. The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N) describes a network-reachable, low-complexity flaw requiring only low privileges - i.e. any authenticated database user with the ability to create/build an index or insert vector data - yielding high confidentiality, integrity, and availability impact (8.8). The CWE-787 out-of-bounds write leading to arbitrary code execution is corroborated by the vendor commit, which adds missing dimension-validation (HnswCheckDim) on the insert/build/scan paths, so the technical-impact=total SSVC rating is well supported. However, the SSVC framework rates Exploitation=none and Automatable=no, no POC is present in the data, there is no CISA KEV listing, and no EPSS probability was supplied - so there is no evidence of real-world exploitation and automated mass-exploitation is unlikely given the authenticated prerequisite. Net: a real patch-now item for pgvector operators because a low-privileged tenant can escalate to RCE in the PostgreSQL backend, but it is not a drive-by internet threat. One conflict to flag explicitly: the description attributes the flaw to 'IVFFlat index build,' yet the referenced fix (commit ee00d39) exclusively modifies HNSW code paths (hnsw.c/hnswbuild.c/hnswinsert.c/hnswscan.c) - verify the actually-affected index type with the vendor advisory before scoping remediation. |
| Exploit ScenarioDerived | A low-privileged but authenticated tenant on a shared PostgreSQL instance (e.g. a multi-tenant SaaS backend using pgvector for embeddings) creates a vector column and inserts or indexes a vector whose dimensionality is crafted to not match the index's expected dimensions. Because the vulnerable version omits the dimension check, the mismatched value drives an out-of-bounds write during tuple insertion/index build, corrupting backend memory and enabling arbitrary code execution in the PostgreSQL server process. No public exploit identified at time of analysis, and exploitation requires valid database credentials. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 01, 2026
Out-of-bounds write in pgvector before 0.8.7 lets an authenticated database user corrupt memory while building or populating a vector index, which can escalate to arbitrary code execution on the PostgreSQL server host. Only users who can create/rebuild a vector index or insert rows into an indexed vector column can trigger it, and the trigger is supplying a vector whose dimensionality does not match the index definition, since affected versions perform no dimension validation. Patch status is a vendor-released fix (0.8.7) and no public exploit code was identified at time of analysis; SSVC scores exploitation as 'none' and automatable as 'no', and EPSS/KEV signals are absent, so this is a high-priority hardening item rather than an emergency - but SSVC rates technical impact as 'total', so multi-tenant databases where untrusted roles hold index or insert privileges are the realistic risk surface.
RemediationAI
Vendor-released patch: upgrade pgvector to 0.8.7 or later, then apply it in-place with ALTER EXTENSION pgvector UPDATE; (or update the OS/package-manager artifact and restart/reconnect as required), and rebuild any existing vector indexes afterwards so on-disk metapages are regenerated consistently with the new checks. Confirm the deployed version with SELECT extversion FROM pg_extension WHERE extname = 'pgvector'; before the extension update is applied, drop and recreate affected indexes. If immediate upgrade is not possible, the most effective compensating control is least privilege on database roles: revoke CREATE on schemas holding vector tables (REVOKE CREATE ON SCHEMA public FROM PUBLIC) and remove INSERT/UPDATE on vector-indexed columns from untrusted or multi-tenant roles, accepting the trade-off that legitimate application writers will need explicit grants scoped to specific tables. A second control is to enforce dimensionality at the application layer so every vector written to an indexed column exactly matches the declared dimension, with the trade-off that it depends on application correctness and does not protect against a hostile authenticated user. Because CVSS PR:L and SSVC automatable='no' indicate this requires valid credentials and manual trigger conditions, restricting which roles can create or rebuild vector indexes materially reduces exposure while the upgrade is scheduled. Track the upstream issue at https://github.com/pgvector/pgvector/issues/1036 and the fix commit at https://github.com/pgvector/pgvector/commit/ee00d39ab30c2a7cf9510abf9288c624d91db156 for any follow-up correction resolving the reported IVFFlat-versus-HNSW index discrepancy.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
pgvector is the standard vector-similarity extension for PostgreSQL, providing IVFFlat and HNSW index access methods for embedding columns. HNSW stores graph metadata (including expected vector dimensions) on disk and rebuilds/updates graph state during index build, tuple insert, and index scan. The flaw is a CWE-787 out-of-bounds write caused by missing dimensionality validation: the affected code paths load the index metapage but never compare the metapage's stored dimension against the dimension of the incoming datum. The upstream commit adds an HnswCheckDim() helper (built on the type's dimension function via DirectFunctionCall1Coll) and threads the index dimensions through HnswGetMetaPageInfo(), HnswInsertTupleOnDisk(), hnswbuild.c's InsertTuple(), and hnswscan.c's GetScanItems(), rejecting mismatched vectors before any buffer arithmetic occurs. Notably, the CVE description attributes the bug to 'IVFFlat index build' while the referenced fix (commit ee00d39ab30c2a7cf9510abf9288c624d91db156) modifies only the HNSW code (src/hnsw.c, hnsw.h, hnswbuild.c, hnswinsert.c, hnswscan.c, hnswutils.c); that IVFFlat-vs-HNSW discrepancy is unresolved in the provided data and should be treated as affecting which index operation is the confirmed trigger, with HNSW being the code path that actually received the validation fix. CVSS 3.1 vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H confirms network reachability, low attack complexity, no user interaction, and - via PR:L - that an authenticated database principal is required; scope is unchanged but confidentiality, integrity, and availability impact are all High.
Know when Pgvector gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Exploitable over a normal DB connection by any authenticated user (AV:N/PR:L) with no special timing or interaction; OOB write to RCE gives full C/I/A within the server process (S:U).
Primary rating from Vendor (PostgreSQL).
CVSS VectorVendor: PostgreSQL
Lifecycle Timeline
2DescriptionCVE.org
IVFFlat index build in pgvector before 0.8.7 allows a database user to write data out-of-bounds, which can lead to arbitrary code execution.
Executive ViewAI
pgvector versions before 0.8.7 on PostgreSQL contain a high-severity out-of-bounds write that can allow a database role with index or insert privileges to corrupt memory and potentially achieve code execution on the database host. The risk is most acute in multi-tenant environments where untrusted roles can create or rebuild vector indexes or insert into indexed vector columns. There is no public exploit identified at time of analysis, but because successful exploitation could lead to full host compromise and data exposure, leadership should treat this as a high-priority hardening item.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
EUVD-2026-91044
GHSA-pw7q-9788-x566
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB