Repository navigation
fix: patch SQLite native bundle used by SqliteVec tests - #633
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #632
What
Microsoft.SemanticKernel.Connectors.SqliteVec1.74.0-preview pulls inMicrosoft.Data.Sqlite9.0.10, which resolvesSQLitePCLRaw.lib.e_sqlite32.1.10. GHSA-2m69-gcr7-jv3q (CVE-2025-6965) covers<= 2.1.11.This adds a central
PackageVersionforSQLitePCLRaw.bundle_e_sqlite32.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
<= 2.1.11). The advisory's "no patched version" field predates the 2.1.12+ releases.Microsoft.Data.Sqlite9.x is built against, avoiding the 3.x provider/packaging changes.bundle_e_sqlite32.1.14 depends onprovider.dynamic_cdeclandlib.e_sqlite3at the same version, so the whole SQLitePCLRaw chain moves together.Native provenance
Checked the
SQLitePCLRaw.lib.e_sqlite32.1.14 nupkg (repository: https://github.com/ericsink/SQLitePCL.raw):e_sqlite3.dlllibe_sqlite3.solibe_sqlite3.dylibCVE-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 forSQLitePCLRaw.lib.e_sqlite32.1.10). The resolved chain isSQLitePCLRaw.core,lib.e_sqlite3andprovider.e_sqlite3, all 2.1.14.dotnet test src/Core/test/UnitTests/LangChain.Core.UnitTests.csproj: 36/40 pass, identical tomainon the same machine. The 4 failures also fail onmainand only happen on Windows:SqliteVec_*(3):File.Delete(dbPath)infinallythrowsIOExceptionbecause Microsoft.Data.Sqlite's connection pool still holds the file. WithSqliteConnection.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=truechecksstate_of_the_union.txtout with CRLF, so the\n\nparagraph 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.LocalRAGalso 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.IntegrationTestsstill reports NU1903 forSSH.NET2025.1.0 (GHSA-mggc-4xg6-vcxf, GHSA-q939-rpr3-3284), which comes in transitively through Testcontainers. That's unrelated to SQLite.ClearAllPools()before deleting the SQLite file) could be its own small PR, if you'd like one.