[#100] Update SQLite to 3.53.3 to mitigate CVE-2025-6965 - #133
Merged
Merged
Conversation
Bump Microsoft.Data.Sqlite from 9.0.1 to 9.0.20 in Analyzer and ReferenceFinder. 9.0.20 requires SQLitePCLRaw.bundle_e_sqlite3 2.1.12, which bundles SQLite 3.53.3 -- past the 3.50.2 fix for CVE-2025-6965 (and the 3.53.2 fix for the FTS5 memory-corruption CVEs). No explicit SQLitePCLRaw pin is needed. When this was first investigated the newest native package carried SQLite 3.49.1, still affected; 2.1.12 shipped in July 2026 and Microsoft.Data.Sqlite 9.0.19+ depends on it. The 2.1.12 native build is compiled with SQLITE_DQS=0, so double-quoted string literals no longer fall back from a failed identifier lookup. Production SQL was already clean, but four literals in AddressablesBuildLayoutTests needed converting to single quotes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Summary
Fixes #100.
This is a routine library update, getting a fix for a known security issue with past versions (but one that was extremely low risk for the way that UnityDataTools uses SQLite)
SQLitePCLRaw.lib.e_sqlite3arrives transitively viaMicrosoft.Data.Sqlite, and the version weshipped (2.1.10) bundles SQLite engine 3.46.1 — older than the 3.50.2 fix for
CVE-2025-6965. This bumps
Microsoft.Data.Sqlitefrom 9.0.1 to 9.0.20, which requiresSQLitePCLRaw.bundle_e_sqlite3 >= 2.1.12and therefore resolves the native package to a buildcarrying SQLite 3.53.3. That also clears the FTS5 memory-corruption CVEs fixed in 3.53.2.
Now that SQLite 3.53.3 has shipped we get the correct version without some of the explicit "pin" work that was described in the original task.
Practical exposure was always low: UnityDataTool is a local CLI that builds its own databases from
Unity build output and runs its own queries, so it never executes untrusted SQL from a network.
This is hygiene and clears dependency scanners.
Changes
Dependency
Analyzer.csprojandReferenceFinder.csproj:Microsoft.Data.Sqlite9.0.1 → 9.0.20. These arethe only two direct references; every other project picks it up transitively.
Microsoft.Data.SQLite→Microsoft.Data.SqliteinAnalyzer.csprojto match thereal package id and the spelling in
ReferenceFinder.csproj.Double-quoted string literals
The reporter flagged that double-quoted string literals can break on a newer SQLite, and that turned
out to be exactly right — for a specific reason worth recording. The 2.1.10 native build does not set
SQLITE_DQS, so a double-quoted token that fails identifier lookup silently falls back to a stringliteral. The 2.1.12 build is compiled with
SQLITE_DQS=0, so that fallback is gone and such aquery is now a hard error.
Analyzer/Resources/*.sqlfiles were already clean — the only"characters are inside--comments. Production C# SQL and the SQL examples inDocumentation/are clean too.UnityDataTool.Tests/AddressablesBuildLayoutTests.cswere not, and failed withno such column: "buildlayout_2025.01.28.16.35.01.json" - should this be a string literal in single-quotes?. Converted to single quotes. A repo-wide sweep found no other occurrence.Testing
dotnet build -c Release— succeeded, 0 warnings, 0 errors.dotnet test -c Release— full suite green:No new tests; the existing analyze golden-database and find-refs tests are the right gate here,
since they execute essentially all of the tool's SQL and would surface any
DQS=0regression — asthey in fact did.
Verified the outcome rather than assuming it:
dotnet list package --include-transitivereportsSQLitePCLRaw.lib.e_sqlite32.1.12 in everyproject.
(
UnityDataTool/bin/Release/net9.0/runtimes/win-x64/native/e_sqlite3.dll) reports SQLite3.53.3 and
DQS=0.Also checked the SQLite changelog for 3.47.0 → 3.53.4: no backwards-incompatible change affecting an
embedded application's SQL. The one documented incompatibility in that range (3.53.0, bare semicolons
after dot-commands) is
sqlite3CLI behaviour, not library behaviour.One CVE remains open against 3.53.3 upstream (
CVE-2026-50813, no released fix yet), but it is in theSession Extension, which this tool does not use and cannot reach.