mssql_server: replace tiberius with mssql (maintained fork with security fixes) - #501
Conversation
…ity fixes) tiberius currently has three unpatched RUSTSEC advisories (RUSTSEC-2026-0098, -0099, -0104), a fix PR (tiberius-rs/tiberius#419) open since 2026-05-12 with no maintainer response, 11 reachable panic sites from untrusted server input (tiberius-rs/tiberius#424, testcontainers#425), and a maintainer handover request (tiberius-rs/tiberius#427) unanswered for 11+ days. Details in testcontainers#500. Drop-in replacement: mssql (https://crates.io/crates/mssql, https://github.com/mssql-rust/mssql-rust) keeps the same Config/AuthMethod/ Client::connect API and the tds73/rustls feature names, so this is a rename, not a rewrite. Verified against the published mssql 1.0.1 crate: cargo check --no-default-features --features mssql_server cargo check --no-default-features --features mssql_server --example mssql_server cargo check --no-default-features --features mssql_server --tests An equally-maintained alternative, tiberius-ng (https://github.com/MattJackson/tiberius-ng), also fixes these issues and keeps the tiberius name/API if maintainers prefer that direction instead. Closes testcontainers#500 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HmakCYmBF3qUgiW7ctoFJm
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. Summary by CodeRabbit
WalkthroughThe development dependency changes from ChangesMSSQL crate migration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized dependency replacement preserves the existing connection configuration and authentication behavior, with no actionable merge-blocking risk remaining beyond normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Linked Issues checkExplanation The changes satisfy the linked objectives in [ Full details: Docstring CoverageExplanation Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.) Full details: Description checkExplanation The description directly explains the dependency replacement, affected files, security motivation, compatibility, and verification steps. The request to skip the PR does not make the description unrelated. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thanks :) |
|
Update: please skip this PR because there's finally progress in the main repo, and it could/should work fine for you. |
|
Did I understand the discussion in tiberius-rs/tiberius#427 correctly that all effort will go into maintaining the original project going forward from now on? |
Update: please skip this PR because there's finally progress in the main repo, and it could/should work fine for you.
Follow-up PR for #500, implementing the code change described there.
Problem
mssql_serverdepends on the Rust cratetiberius, which is experiencing multiple securityproblems and slow maintenance. Specifics below.
Solution
Replace
tiberiuswithmssql(mssql-rust/mssql-rust), a maintained fork I
publish, which carries the security fixes described below. An equally-maintained alternative,
tiberius-ng(MattJackson/tiberius-ng), also fixes these
issues and keeps the
tiberiusname/API if maintainers prefer that direction instead — happyto redo this PR against that fork if so.
Code change
mssql'sConfig/AuthMethod/Client::connectAPI is unchanged fromtiberius's, and itkeeps the same
tds73/rustlsfeature names this crate already used, so this is a rename, nota rewrite:
Cargo.toml,examples/mssql_server.rs, andsrc/mssql_server/mod.rs:124.Verified against the published
mssql1.0.1 crate:All pass.
Security specifics
-0099,
-0104
implements exactly this upgrade. It's been open since 2026-05-12 with no maintainer response.
and #425 document 11 sites in the TDS decoder
where a malformed/malicious server response aborts the client process rather than returning
Err. Tracked by the RustSec working group at advisory-db#3148.request (#427) went unanswered for 11 days.
Closes #500
Drafted with Claude Code; I reviewed and take responsibility for the change.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HmakCYmBF3qUgiW7ctoFJm