Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as database user
-
DeliveryInsert crafted high-dimension vector rows
-
ExploitCREATE INDEX USING ivfflat
-
ExecutionWrap Size calc in ElkanKmeans
-
PersistOut-of-bounds heap write during k-means
-
ImpactCorrupt backend memory for code execution
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires: (1) the PostgreSQL server running a 32-bit build of pgvector before 0.8.6 - the vulnerability does not exist on 64-bit systems; (2) an authenticated database user (PR:L) with privileges to create an IVFFlat index and supply vector data with attacker-controlled dimensionality and row counts sufficient to overflow the Size calculations in ElkanKmeans; and (3) actually building an IVFFlat index (the HNSW path and query-time operations are not implicated by this specific code). Limiting factors: 64-bit deployments are entirely immune, valid database credentials with index-creation rights are needed, and turning the heap overflow into code execution depends on the target's memory layout, making reliable RCE non-trivial. |
| Impact | The published CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, base 8.8) rates this High/Critical, but that score understates the environmental gating: the description explicitly limits impact to 32-bit systems, an uncommon and shrinking deployment class for database servers, and exploitation requires an authenticated database user (PR:L) able to create an IVFFlat index. There is no EPSS score, KEV entry, or public PoC in the provided data, indicating no evidence of active exploitation and no confirmed weaponization. Reaching arbitrary code execution from a heap out-of-bounds write in a PostgreSQL backend is non-trivial and platform-dependent, so real-world risk is materially lower than 8.8 suggests for the vast majority of environments running 64-bit builds. Note a caveat: the CVSS AC:L implies easy exploitation, yet the 32-bit-only precondition and RCE reliability argue for higher practical complexity - verify platform exposure before prioritizing. |
| Exploit ScenarioDerived | On a 32-bit PostgreSQL server, an attacker holding an ordinary database account with rights to create tables and indexes inserts specially dimensioned vector data and issues a CREATE INDEX ... USING ivfflat statement whose sample, center, and dimension parameters cause the size calculation to wrap. The undersized buffer is then overflowed during k-means clustering, corrupting backend heap memory in an attempt to hijack control flow and execute code with the privileges of the PostgreSQL server process. No public exploit is currently available, and successful RCE would require reliable heap grooming on the specific 32-bit build. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 29, 2026
Out-of-bounds write in the pgvector PostgreSQL extension (versions before 0.8.6) lets an authenticated database user trigger an integer wraparound during IVFFlat index construction, corrupting heap memory in the backend process and potentially achieving arbitrary code execution. The flaw is exploitable only on 32-bit systems, where size calculations in the k-means clustering routine overflow the Size type. There is no public exploit identified at time of analysis and it is not listed in CISA KEV.
RemediationAI
Upgrade pgvector to version 0.8.6 or later, which incorporates the overflow-checked allocation fix (commit 636a92a3395d2e036ffd40d07aeb400a708ae104; see issue https://github.com/pgvector/pgvector/issues/1006). If immediate upgrade is not possible, the most effective compensating control is to run the database server on a 64-bit build, which eliminates the wraparound entirely; where that is not feasible, restrict who can create indexes by revoking CREATE privilege on schemas and limiting table ownership so only trusted roles can build IVFFlat indexes, and avoid exposing IVFFlat index creation to untrusted or multi-tenant users. The trade-off of privilege restriction is reduced self-service for legitimate users who need to manage their own vector indexes.
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 a widely used PostgreSQL extension that adds vector data types and approximate-nearest-neighbor indexes (IVFFlat and HNSW) for embedding and similarity search workloads. The bug is a classic CWE-190 integer overflow/wraparound: in ivfkmeans.c, the ElkanKmeans routine computed allocation sizes such as sizeof(float) * numCenters * dimensions and sizeof(float) * numSamples * numCenters using native multiplication on 32-bit Size values. With attacker-influenced dimensions/sample/center counts, these products wrap around to a small value, causing an undersized allocation followed by out-of-bounds writes during index build. The fix (commit 636a92a) replaces raw arithmetic with PostgreSQL's overflow-checked mul_size()/add_size() helpers, which raise an error instead of silently wrapping. On 64-bit platforms the 64-bit Size type is large enough that the products do not wrap, which is why only 32-bit systems are affected.
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
Network-reachable DB (AV:N) but requires an authenticated user (PR:L) and the uncommon 32-bit platform plus reliable heap overflow, so AC:H rather than the published AC:L.
Primary rating from Vendor (PostgreSQL).
CVSS VectorVendor: PostgreSQL
Lifecycle Timeline
2DescriptionCVE.org
Integer wraparound in IVFFlat index build in pgvector before 0.8.6 allows a database user to write data out-of-bounds, which could lead to arbitrary code execution. Only 32-bit systems are affected.
Executive ViewAI
A remote code execution vulnerability in pgvector (PostgreSQL vector extension) before version 0.8.6 allows authenticated database users to achieve arbitrary code execution through heap memory corruption on 32-bit systems. This affects organizations using pgvector for AI/ML similarity search applications; while the attack requires valid database credentials, successful exploitation could compromise database confidentiality and integrity.
Apply vendor patch: upgrade to pgvector 0.8.6 or later. For systems unable to patch immediately, restrict database access to least-privilege credentials only and consider isolating 32-bit PostgreSQL instances pending patching.
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
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Same weakness CWE-190 – Integer Overflow or Wraparound
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Server Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| openSUSE Leap 16.0 | Affected |
| SUSE Linux Enterprise Module for Server Applications 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-50474
GHSA-87hg-xjfg-qh5r
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB