Skip to main content

pgvector EUVDEUVD-2026-50474

| CVE-2026-18022 HIGH
Integer Overflow or Wraparound (CWE-190)
2026-07-29 PostgreSQL GHSA-87hg-xjfg-qh5r
8.8
CVSS 3.1 · Vendor: PostgreSQL
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as database user
  2. Delivery
    Insert crafted high-dimension vector rows
  3. Exploit
    CREATE INDEX USING ivfflat
  4. Execution
    Wrap Size calc in ElkanKmeans
  5. Persist
    Out-of-bounds heap write during k-means
  6. Impact
    Corrupt 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

pgvector 0 <0.8.6

Affected Packages

euvd pgvector fix: 0.8.6

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

Vendor (PostgreSQL) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.5 HIGH

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.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE HIGH
Red Hat 8.8 HIGH

Primary rating from Vendor (PostgreSQL).

CVSS VectorVendor: PostgreSQL

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Jul 29, 2026 - 20:02 EUVD
CVE Published
Jul 29, 2026 - 18:55 cve.org
HIGH 8.8

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 73% exploitable
Prevalence
Medium
popular PostgreSQL vector extension, but 32-bit database servers are uncommon
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

Vendor 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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy