Repository navigation
fix(pgvector): bump 0.8.2 -> 0.8.7 (CVE-2026-103484) and block publishing an older build - #19
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
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 · // .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-verifyBoth the PR verify step ( This PR raises
Reviewed commit: c2b7544 |
There was a problem hiding this comment.
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
- 🟡 Symbol probe is never called, so step 3 cannot fail — verify-pgvector-security.sh:45
- 🟡 arm64 image pushed with no security verification — docker.yml:113
| 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 |
There was a problem hiding this comment.
🟡 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.
Summary
The published
postgres-plus:18image (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 byee00d39, which is the commit directly under thev0.8.7tag.Dockerfile:PGVECTOR_VERSION0.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 bymake test/make verify-security): fails whendefault_versionor installedextversionis below 0.8.7, orvector.sodoes not exportsparsevec_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
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_dimsv0.8.7verify-postgres-security.shpasses; IVFFlat index create and index-ordered query workThe 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/:latestdigests. Consumers that pin by digest need the new digest; consumers on the floating:18tag 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