Skip to content

Restore Mongo provider with patched dependencies#2

Merged
Cadtastic merged 1 commit into
masterfrom
fix/mongodb-driver-security-update
May 22, 2026
Merged

Restore Mongo provider with patched dependencies#2
Cadtastic merged 1 commit into
masterfrom
fix/mongodb-driver-security-update

Conversation

@Cadtastic
Copy link
Copy Markdown
Contributor

Summary

  • Bumps MongoDB.Driver 3.6.0 → 3.8.1 to pick up a patched Snappier (GHSA-pggp-6c3x-2xmx, high severity).
  • Adds a NuGetAuditSuppress for GHSA-6c8g-7p36-r338 / CVE-2026-44788 — path traversal in SharpCompress.WriteToDirectory(). The driver pulls SharpCompress transitively for wire-protocol compression; the vulnerable archive-extraction path is not reachable through driver usage, and no patched SharpCompress version is currently available (all versions ≤ 0.47.4 are affected). The suppress is documented inline in Directory.Build.props with a re-evaluation note.
  • Routine version bumps: Microsoft.Extensions.* and Microsoft.Data.Sqlite → 10.0.8, Microsoft.NET.Test.Sdk → 18.5.1, coverlet.collector → 10.0.1, BenchmarkDotNet diagnostics package → 18.7.37220.1.

Why

The Mongo provider was unbuildable: master couldn't restore at all because MongoDB.Driver 3.6.0 pulled vulnerable Snappier 1.0.0 and SharpCompress 0.30.1, both flagged by NuGetAudit under our TreatWarningsAsErrors=true policy. Removing the package wasn't a long-term fix; the user wants the Mongo provider available. Upgrading to 3.8.1 resolves the Snappier issue automatically and leaves only the unfixable-upstream SharpCompress finding, which we explicitly accept.

Test plan

  • dotnet restore clean on the whole solution.
  • dotnet build -c Debug — 0 warnings, 0 errors across net8.0, net9.0, net10.0.
  • dotnet test — 66/72 passing. The 6 failures are pre-existing bugs in src/StateStore/Internal/KeyHelper.cs:17 (wrong exception type for null keys; empty/whitespace inputs aren't rejected at all). Unrelated to MongoDB and not reachable on master because master can't restore — these tests were already failing before this branch and will be addressed in a follow-up.
  • Integration smoke test against a real MongoDB instance — not run here; the provider only uses stable MongoClient / IMongoCollection<BsonDocument> / Builders<> APIs that are unchanged between 3.6 and 3.8, but worth confirming before tagging a release.

🤖 Generated with Claude Code

Bumps MongoDB.Driver 3.6.0 -> 3.8.1 to pick up a patched Snappier
(GHSA-pggp-6c3x-2xmx, high severity) and suppresses the SharpCompress
advisory GHSA-6c8g-7p36-r338 / CVE-2026-44788. SharpCompress is pulled
transitively by MongoDB.Driver for wire-protocol compression; the
vulnerable WriteToDirectory() path is unreachable through driver usage,
and no patched SharpCompress version is currently available.

Also bumps Microsoft.Extensions.* to 10.0.8, Microsoft.Data.Sqlite to
10.0.8, Microsoft.NET.Test.Sdk to 18.5.1, coverlet.collector to 10.0.1,
and the BenchmarkDotNet diagnostics package to 18.7.37220.1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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