Skip to content

fix: patch SQLite native bundle used by SqliteVec tests - #633

Merged
HavenDV merged 1 commit into
tryAGI:mainfrom
abduladnan-mt7:fix/issue-632
Oct 17, 2026
Merged

HavenDV merged 1 commit into
tryAGI:mainfrom
abduladnan-mt7:fix/issue-632

Conversation

@abduladnan-mt7

Copy link
Copy Markdown
Contributor

Fixes #632

What

Microsoft.SemanticKernel.Connectors.SqliteVec 1.74.0-preview pulls in Microsoft.Data.Sqlite 9.0.10, which resolves SQLitePCLRaw.lib.e_sqlite3 2.1.10. GHSA-2m69-gcr7-jv3q (CVE-2025-6965) covers <= 2.1.11.

This adds a central PackageVersion for SQLitePCLRaw.bundle_e_sqlite3 2.1.14 and references it directly from the two test projects that use SqliteVec (LangChain.Core.UnitTests, LangChain.IntegrationTests). The SqliteVec tests are unchanged and NU1903 is not suppressed.

Why 2.1.14

  • Outside the advisory's affected range (<= 2.1.11). The advisory's "no patched version" field predates the 2.1.12+ releases.
  • Stays on the 2.1.x line that Microsoft.Data.Sqlite 9.x is built against, avoiding the 3.x provider/packaging changes.
  • bundle_e_sqlite3 2.1.14 depends on provider.dynamic_cdecl and lib.e_sqlite3 at the same version, so the whole SQLitePCLRaw chain moves together.

Native provenance

Checked the SQLitePCLRaw.lib.e_sqlite3 2.1.14 nupkg (repository: https://github.com/ericsink/SQLitePCL.raw):

RID File SQLite version Source id
win-x64 e_sqlite3.dll 3.54.0 2026-10-09 15:46:58 be8d059e9a49089ab2dc
linux-x64 libe_sqlite3.so 3.54.0 2026-10-09 15:46:58 be8d059e9a49089ab2dc
osx-arm64 libe_sqlite3.dylib 3.54.0 2026-10-09 15:46:58 be8d059e9a49089ab2dc

CVE-2025-6965 is fixed in SQLite 3.50.2.

Validation

Run locally on Windows 11 x64 with .NET SDK 10.0.402.

  • dotnet list src/Core/test/UnitTests/LangChain.Core.UnitTests.csproj package --vulnerable --include-transitive: no vulnerable packages (before: NU1903 for SQLitePCLRaw.lib.e_sqlite3 2.1.10). The resolved chain is SQLitePCLRaw.core, lib.e_sqlite3 and provider.e_sqlite3, all 2.1.14.
  • dotnet test src/Core/test/UnitTests/LangChain.Core.UnitTests.csproj: 36/40 pass, identical to main on the same machine. The 4 failures also fail on main and only happen on Windows:
    • SqliteVec_* (3): File.Delete(dbPath) in finally throws IOException because Microsoft.Data.Sqlite's connection pool still holds the file. With SqliteConnection.ClearAllPools() added before the delete (local only, not in this PR), all 3 SqliteVec tests pass against the 3.54.0 natives, including vector search through sqlite-vec.
    • TextLoaderTest: core.autocrlf=true checks state_of_the_union.txt out with CRLF, so the \n\n paragraph split finds 1 paragraph instead of 359.
  • dotnet build src/Meta/test/LangChain.IntegrationTests.csproj: succeeds, and no SQLite advisories remain.

I haven't run validation on Linux or macOS. The natives for those RIDs are listed above, and CI covers Linux.

Not in this PR

  • examples/LangChain.Samples.LocalRAG also references SqliteVec 1.74.0-preview with an inline version, outside central package management. I can apply the same override there, in this PR or a follow-up.
  • LangChain.IntegrationTests still reports NU1903 for SSH.NET 2025.1.0 (GHSA-mggc-4xg6-vcxf, GHSA-q939-rpr3-3284), which comes in transitively through Testcontainers. That's unrelated to SQLite.
  • Windows test cleanup (ClearAllPools() before deleting the SQLite file) could be its own small PR, if you'd like one.

SqliteVec 1.74.0-preview resolves SQLitePCLRaw.lib.e_sqlite3 2.1.10
through Microsoft.Data.Sqlite 9.0.10, which is affected by
GHSA-2m69-gcr7-jv3q (<= 2.1.11). Reference SQLitePCLRaw.bundle_e_sqlite3
2.1.14 directly in both test projects that use SqliteVec. It ships SQLite
3.54.0 natives (source id 2026-10-09 be8d059e) for win-x64, linux-x64 and
osx-arm64, and stays on the 2.1.x line that Microsoft.Data.Sqlite 9
targets.

The SqliteVec tests are unchanged and NU1903 is not suppressed.

Fixes tryAGI#632
@CLAassistant

CLAassistant commented Oct 16, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@HavenDV
HavenDV merged commit fd8c6b0 into tryAGI:main Oct 17, 2026
2 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.

Replace vulnerable test-only SQLite native bundle without dropping vector coverage

3 participants