Skip to content

fix(pgvector): bump 0.8.2 -> 0.8.7 (CVE-2026-103484) and block publishing an older build - #19

Merged
devin-ai-integration[bot] merged 1 commit into
mainfrom
feat/pgvector-0.8.7
Nov 17, 2026
Merged

devin-ai-integration[bot] merged 1 commit into
mainfrom
feat/pgvector-0.8.7

Conversation

@pyramation

@pyramation pyramation commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The published postgres-plus:18 image (sha256:5974d559…, amd64 and arm64, same digest on GHCR and Docker Hub) ships pgvector 0.8.2. Upstream's notice pgvector#1036 (CVE-2026-103484) says a database user who can create an IVFFlat index can write out of bounds, affecting 0.8.6 and below, fixed in 0.8.7 by ee00d39, which is the commit directly under the v0.8.7 tag.

  • Dockerfile: PGVECTOR_VERSION 0.8.2 -> 0.8.7.

  • scripts/verify-pgvector-security.sh (new, run by CI on the amd64 PR build and on the pushed amd64 digest, and by make test / make verify-security): fails when

    • the extension's default_version or installed extversion is below 0.8.7, or
    • vector.so does not export sparsevec_vector_dims. That symbol was added by the fix commit and is not in the SQL install script, so binding a temp C function to it proves the library, not just the SQL metadata, is patched.

    It builds no index and attempts no out-of-bounds write.

  • README: version table and a "pgvector security floor" section.

Verified locally

Image Result
current postgres-plus:18 (0.8.2) FAIL: pgvector default_version 0.8.2 is below the patched floor 0.8.7; with the floor lowered to 0.8.2, FAIL: vector.so does not export sparsevec_vector_dims
same image with pgvector rebuilt from v0.8.7 gate passes; verify-postgres-security.sh passes; IVFFlat index create and index-ordered query work

The full multi-stage build was not run locally; the PR's amd64 build job runs it and the three gates. arm64 is built but, as with the existing PostGIS and Postgres gates, not verified by CI.

After merge

Merging publishes new :18 / :latest digests. Consumers that pin by digest need the new digest; consumers on the floating :18 tag pick it up on next pull.

Link to Devin session: https://app.devin.ai/sessions/526ad15103ba4700897c0cf7aa8bbdfc
Open in Devin Desktop: https://app.devin.ai/desktop/session/526ad15103ba4700897c0cf7aa8bbdfc?variant=devin
Requested by: @pyramation


🟢 Devin Review found nothing to fix · View findings

Devin Review

@devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@luxor-code-review

luxor-code-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Review complete. 🟡 2 medium

💬 Inline comments (1)

📍 Findings outside the diff (1) — 🟡 1 medium — defects on lines GitHub can't attach comments to

🟡 Medium — arm64 image pushed with no security verification · docker.yml:113–121 · unchanged line

// .github/workflows/docker.yml
113	        if: github.event_name != 'pull_request' && matrix.platform == 'linux/amd64'
114	        run: |
115	          set -euo pipefail
116	          image="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build.outputs.digest }}"
117	          docker run -d --name postgis-verify -e POSTGRES_PASSWORD=test "$image"
118	          until docker exec postgis-verify pg_isready -U postgres -q; do sleep 1; done
119	          ./scripts/verify-postgis-security.sh postgis-verify
120	          ./scripts/verify-postgres-security.sh postgis-verify
121	          ./scripts/verify-pgvector-security.sh postgis-verify

Both the PR verify step (docker.yml:87) and the pushed-digest verify step (docker.yml:113) are gated on matrix.platform == 'linux/amd64', so the arm64 job pushes its digest with none of the security checks — including the new pgvector/CVE-2026-103484 gate. The manifest job then merges the unverified arm64 digest into latest/18.


This PR raises PGVECTOR_VERSION to 0.8.7 in the Dockerfile and adds scripts/verify-pgvector-security.sh, a three-step gate that checks the installed pgvector SQL version, the pg_available_extension_versions floor, and a probe of the sparsevec_vector_dims symbol in vector.so. The workflow wires the gate into both the PR build path and the pushed-digest verification, and the Makefile/README expose a verify-security entry point and documentation. Two gaps remain: the symbol probe never actually calls the function (so the CVE fix assertion is vacuous), and the arm64 leg is pushed unverified before being merged into the multi-arch manifest.

Files Change
Dockerfile, Makefile Bump PGVECTOR_VERSION to 0.8.7 and add a verify-security target invoking the new script.
scripts/verify-pgvector-security.sh New gate: SQL version checks, extension availability floor, and a (currently inert) symbol probe for CVE-2026-103484.
.github/workflows/docker.yml Runs the pgvector security verification on the built image for PR builds and again against the pushed amd64 digest.
README.md Documents the new security-verification flow and the 0.8.7 upgrade.

Reviewed commit: c2b7544

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@luxor-code-review luxor-code-review Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumps pgvector to 0.8.7 to address CVE-2026-103484 and adds a security verification script plus CI gate for the pgvector build.

Key findings

Comment on lines +45 to +50
psql >/dev/null 2>&1 <<'SQL' || fail "vector.so does not export sparsevec_vector_dims — library predates the CVE-2026-103484 fix"
BEGIN;
CREATE FUNCTION pg_temp.pgvector_fix_probe(sparsevec) RETURNS integer
AS '$libdir/vector', 'sparsevec_vector_dims' LANGUAGE C IMMUTABLE STRICT;
ROLLBACK;
SQL

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 security · medium

Symbol probe is never called, so step 3 cannot fail

The CVE-2026-103484 probe in scripts/verify-pgvector-security.sh:45-50 only runs CREATE FUNCTION pg_temp.pgvector_fix_probe(sparsevec) ... AS '$libdir/vector', 'sparsevec_vector_dims' and immediately rolls back. PostgreSQL resolves the C symbol lazily at first call, so a pre-fix vector.so still passes this step and the "fix compiled in" assertion is vacuous; only the SQL version checks in steps 1-2 are actually enforced.

📋 Prompt for AI Agents

In scripts/verify-pgvector-security.sh around lines 45-50, the heredoc creates the probe function but never calls it, so PostgreSQL never resolves the 'sparsevec_vector_dims' symbol and the CVE fix assertion always passes. Insert SELECT pg_temp.pgvector_fix_probe(sparsevec '1:1'::sparsevec); (any valid sparsevec literal) after the CREATE FUNCTION and keep the ROLLBACK after the SELECT.

@devin-ai-integration
devin-ai-integration Bot merged commit 730b7f6 into main Nov 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant