go.mongodb.org/mongo-driver/v2 breaking changes
go.mongodb.org/mongo-driver/v2 v2.10.1 (November 19, 2026) is its newest release with breaking changes, 2 of them. The first: PLAIN credentials containing NUL characters are now rejected in go.mongodb.org/mongo-driver/v2 v2.10.1. Every breaking API change we have recorded in go.mongodb.org/mongo-driver/v2 on Go modules: 27 breaking changes in 7 versions. Below, its 7 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version v2.10.1, released November 19, 2026. Source repository
Its v2.9.0 release requires Go 1.25 or later. Go end of life dates.
go.mongodb.org/mongo-driver/v2 v2.10.1 breaking changes
- Behavior changed
The driver now rejects a PLAIN username or password containing a NUL character before sending the authentication command. Credentials that previously worked with NUL characters will fail and must be changed. github.com - Behavior changed
Connection string errors are now less detailed to avoid leaking secrets. Code that matches on the previous error text may need to be updated. github.com
go.mongodb.org/mongo-driver/v2 v2.9.2 breaking changes
- Behavior changed
Operations run in a session now inherit timeoutMS from the client, so they can time out where they previously did not. Review client timeout settings for code that uses sessions. github.com
go.mongodb.org/mongo-driver/v2 v2.9.1 breaking changes
- Behavior changed
(*GridFSBucket).Delete
GridFS delete methods now use an exact match on the file ID, which fixes CVE-2026-88031. Code that relied on looser matching must wrap the file ID in a $eq filter, for example bson.D{{"$eq", id}}. github.com
go.mongodb.org/mongo-driver/v2 v2.9.0 breaking changes
- Removed
Go versions below 1.25 are no longer supported, so the Go toolchain must be upgraded to 1.25 or later. github.com - Removed
Servers older than 4.4 are no longer supported, so MongoDB servers must be upgraded to 4.4 or later. github.com - Removed
go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth/creds.AWSCredentialProvider
go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth/creds.AWSCredentialProvider was removed in go.mongodb.org/mongo-driver/v2 v2.9.0 pkg.go.dev - Removed
go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth/creds.NewAWSCredentialProvider
go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth/creds.NewAWSCredentialProvider was removed in go.mongodb.org/mongo-driver/v2 v2.9.0 pkg.go.dev - Removed
go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation
go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation was removed in go.mongodb.org/mongo-driver/v2 v2.9.0 pkg.go.dev - Behavior changed
With MongoDB 9.0 Intelligent Workload Management, overload errors are retried only when that is expected not to worsen server conditions. github.com - Signature changed
Code implementing the built-in AWS credential interfaces may need updating to the new interface shapes. github.com
go.mongodb.org/mongo-driver/v2 v2.8.2 breaking changes
- Behavior changed
Client.BulkWrite
Database names containing characters such as a period are now rejected with an error in Client.BulkWrite instead of being forwarded. Code that passes such names must use valid database names. github.com
go.mongodb.org/mongo-driver/v2 v2.8.0 breaking changes
- Removed
go.mongodb.org/mongo-driver/v2/mongo/options.EncryptOptions.TextOptions
go.mongodb.org/mongo-driver/v2/mongo/options.EncryptOptions.TextOptions was removed in go.mongodb.org/mongo-driver/v2 v2.8.0 pkg.go.dev - Removed
go.mongodb.org/mongo-driver/v2/mongo/options.EncryptOptionsBuilder.SetTextOptions
EncryptOptionsBuilder.SetTextOptions is renamed to SetStringOptions. Update calls to the new method name. pkg.go.dev - Removed
go.mongodb.org/mongo-driver/v2/mongo/options.Text
options.Text() is renamed to options.String(). Update calls to the new name. pkg.go.dev - Removed
go.mongodb.org/mongo-driver/v2/mongo/options.TextOptions
go.mongodb.org/mongo-driver/v2/mongo/options.TextOptions was removed in go.mongodb.org/mongo-driver/v2 v2.8.0 pkg.go.dev - Removed
go.mongodb.org/mongo-driver/v2/mongo/options.TextOptionsBuilder
go.mongodb.org/mongo-driver/v2/mongo/options.TextOptionsBuilder was removed in go.mongodb.org/mongo-driver/v2 v2.8.0 pkg.go.dev - Removed
go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt/options.ExplicitEncryptionOptions.SetTextOptions
go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt/options.ExplicitEncryptionOptions.SetTextOptions was removed in go.mongodb.org/mongo-driver/v2 v2.8.0 pkg.go.dev - Removed
go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt/options.ExplicitEncryptionOptions.TextOptions
go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt/options.ExplicitEncryptionOptions.TextOptions was removed in go.mongodb.org/mongo-driver/v2 v2.8.0 pkg.go.dev - Removed
go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation.NewUpdate
go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation.NewUpdate was removed in go.mongodb.org/mongo-driver/v2 v2.8.0 pkg.go.dev - Removed
go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation.Update
go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation.Update was removed in go.mongodb.org/mongo-driver/v2 v2.8.0 pkg.go.dev - Removed
go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation.UpdateResult
go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation.UpdateResult was removed in go.mongodb.org/mongo-driver/v2 v2.8.0 pkg.go.dev
And 4 more in this version. Sign up to see every change
Older versions
1 older version.
Show 1 older version
go.mongodb.org/mongo-driver/v2 v2.6.1 breaking changes
- Behavior changed
bson.Raw
Decoding a BSON null into bson.Raw now yields Raw(nil) rather than the previous Raw{}. Code that checks for Raw{} should be updated to expect Raw(nil) or nil. github.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.