<Vulnerability name="CVE-2026-18022">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Important</ThreatSeverity>
    <PublicDate>2026-07-29T18:55:54</PublicDate>
    <Bugzilla id="2508603" url="https://bugzilla.redhat.com/show_bug.cgi?id=2508603" xml:lang="en:us">
pgvector: pgvector: Arbitrary Code Execution via Integer Wraparound
    </Bugzilla>
    <CVSS3 status="draft">
        <CVSS3BaseScore>8.8</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-787</CWE>
    <Details xml:lang="en:us" source="Mitre">
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.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in pgvector. An integer wraparound vulnerability exists during the IVFFlat index build process. This flaw allows a database user on a 32-bit system to write data outside of allocated memory buffers. Successful exploitation could lead to arbitrary code execution.
    </Details>
    <Statement xml:lang="en:us">
Only 32-bit systems are affected. Affected products support 64-bit systems only.
    </Statement>
    <PackageState cpe="cpe:/a:redhat:lightspeed_core">
        <ProductName>Lightspeed Core</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>lightspeed-core/rag-tool-cpu-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:lightspeed_core">
        <ProductName>Lightspeed Core</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>lightspeed-core/rag-tool-cuda-12.9-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:openshift_lightspeed">
        <ProductName>OpenShift Lightspeed</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>openshift-lightspeed/lightspeed-ocp-rag-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:ansible_automation_platform:2">
        <ProductName>Red Hat Ansible Automation Platform 2</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>ansible-automation-platform-25/lightspeed-chatbot-rhel8</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:9">
        <ProductName>Red Hat Enterprise Linux 9</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>postgresql:16/pgvector</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:9">
        <ProductName>Red Hat Enterprise Linux 9</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>postgresql:18/pgvector</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:trusted_profile_analyzer:2">
        <ProductName>Red Hat Trusted Profile Analyzer</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>rhtpa/rhtpa-trustification-service-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:trusted_profile_analyzer:3">
        <ProductName>Red Hat Trusted Profile Analyzer</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>rhtpa/rhtpa-rhel10</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-18022
https://nvd.nist.gov/vuln/detail/CVE-2026-18022
https://github.com/pgvector/pgvector/commit/636a92a3395d2e036ffd40d07aeb400a708ae104
https://github.com/pgvector/pgvector/issues/1006
    </References>
</Vulnerability>